1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2025-04-21 12:27:27 +03:00

b2/: introduce dimensionless values (field syntax: name=##)

This commit is contained in:
Werner Almesberger
2012-06-01 00:20:31 -03:00
parent 4fb5f26043
commit d48a9030e0
7 changed files with 72 additions and 14 deletions

View File

@@ -79,7 +79,7 @@ EOF
#------------------------------------------------------------------------------
tst "hierarchy: absolute value rule" <<EOF
tst "hierarchy: absolute value rule (with unit)" <<EOF
<predation> = mouse<cat<dog;
N=#R {
10R: { X=* };
@@ -98,6 +98,25 @@ EOF
#------------------------------------------------------------------------------
tst "hierarchy: absolute value rule (without unit)" <<EOF
<predation> = mouse<cat<dog;
N=## {
2: { X=* };
5k: { Y=* };
3.1: { Z=* };
};
EOF
expect <<EOF
N=## {
2: { X=* }
5000: { Y=* }
3.1: { Z=* }
}
EOF
#------------------------------------------------------------------------------
tst_fail "hierarchy: absolute value rule (different unit)" <<EOF
<predation> = mouse<cat<dog;
N=#R {
@@ -142,7 +161,7 @@ EOF
#------------------------------------------------------------------------------
tst "hierarchy: relative value rule (absolute)" <<EOF
tst "hierarchy: relative value rule (absolute, with unit)" <<EOF
{ V=#R }
TOL=%V {
1R: { X=* };
@@ -160,6 +179,24 @@ EOF
#------------------------------------------------------------------------------
tst "hierarchy: relative value rule (absolute, without unit)" <<EOF
{ V=## }
TOL=%V {
1: { X=* };
1k: { Y=* };
};
EOF
expect <<EOF
{ V=## }
TOL=%# {
-1/+1: { X=* }
-1000/+1000: { Y=* }
}
EOF
#------------------------------------------------------------------------------
tst "hierarchy: relative value rule (plus/minus percent)" <<EOF
{ V=#R }
TOL=%V {