1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-02 20:17:11 +02:00
eda-tools/b2/test/hierred

136 lines
2.0 KiB
Plaintext
Raw Normal View History

#!/bin/bash
. ./Common
###############################################################################
tst "hierarchy: == 1 followed by == 2" <<EOF
N=## {
1: { X=* };
2: { Y=* };
};
EOF
expect <<EOF
N=## {
1: { X=* }
2: { Y=* }
}
EOF
#------------------------------------------------------------------------------
tst "hierarchy: == 2 followed by unreachable == 2" <<EOF
N=## {
2: { X=* };
2: { Y=* };
};
EOF
expect <<EOF
h:4: warning: unreachable condition
N=## {
2: { X=* }
2: { Y=* }
}
EOF
#------------------------------------------------------------------------------
tst "hierarchy: < 2 followed by < 3" <<EOF
N=## {
<2: { X=* };
<3: { Y=* };
};
EOF
expect <<EOF
N=## {
<2: { X=* }
<3: { Y=* }
}
EOF
#------------------------------------------------------------------------------
tst "hierarchy: < 3 followed by unreachable < 2" <<EOF
N=## {
<3: { X=* };
<2: { Y=* };
};
EOF
expect <<EOF
h:4: warning: unreachable condition
N=## {
<3: { X=* }
<2: { Y=* }
}
EOF
#------------------------------------------------------------------------------
tst "hierarchy: < 2 followed by <= 2" <<EOF
N=## {
<2: { X=* };
<=2: { Y=* };
};
EOF
expect <<EOF
N=## {
<2: { X=* }
<=2: { Y=* }
}
EOF
#------------------------------------------------------------------------------
tst "hierarchy: <= 2 followed by unreachable < 2" <<EOF
N=## {
<=2: { X=* };
<2: { Y=* };
};
EOF
expect <<EOF
h:4: warning: unreachable condition
N=## {
<=2: { X=* }
<2: { Y=* }
}
EOF
#------------------------------------------------------------------------------
tst "hierarchy: < 3 followed by > 1" <<EOF
N=## {
<3: { X=* };
>1: { Y=* };
};
EOF
expect <<EOF
N=## {
<3: { X=* }
>1: { Y=* }
}
EOF
#------------------------------------------------------------------------------
tst "hierarchy: < 3 followed by predictable but reachable > 2" <<EOF
N=## {
<3: { X=* };
>2: { Y=* };
};
EOF
expect <<EOF
N=## {
<3: { X=* }
>2: { Y=* }
}
EOF
###############################################################################