mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-16 23:00:18 +02:00
136 lines
2.1 KiB
Bash
Executable File
136 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
. ./Common
|
|
|
|
###############################################################################
|
|
|
|
tst "hierarchy: == 1 followed by == 2" -dh <<EOF
|
|
N=## {
|
|
1: { X=* };
|
|
2: { Y=* };
|
|
};
|
|
EOF
|
|
|
|
expect <<EOF
|
|
N=## {
|
|
1: { X=* }
|
|
2: { Y=* }
|
|
}
|
|
EOF
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
tst "hierarchy: == 2 followed by unreachable == 2" -dh <<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" -dh <<EOF
|
|
N=## {
|
|
<2: { X=* };
|
|
<3: { Y=* };
|
|
};
|
|
EOF
|
|
|
|
expect <<EOF
|
|
N=## {
|
|
<2: { X=* }
|
|
<3: { Y=* }
|
|
}
|
|
EOF
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
tst "hierarchy: < 3 followed by unreachable < 2" -dh <<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" -dh <<EOF
|
|
N=## {
|
|
<2: { X=* };
|
|
<=2: { Y=* };
|
|
};
|
|
EOF
|
|
|
|
expect <<EOF
|
|
N=## {
|
|
<2: { X=* }
|
|
<=2: { Y=* }
|
|
}
|
|
EOF
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
tst "hierarchy: <= 2 followed by unreachable < 2" -dh <<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" -dh <<EOF
|
|
N=## {
|
|
<3: { X=* };
|
|
>1: { Y=* };
|
|
};
|
|
EOF
|
|
|
|
expect <<EOF
|
|
N=## {
|
|
<3: { X=* }
|
|
>1: { Y=* }
|
|
}
|
|
EOF
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
tst "hierarchy: < 3 followed by predictable but reachable > 2" -dh <<EOF
|
|
N=## {
|
|
<3: { X=* };
|
|
>2: { Y=* };
|
|
};
|
|
EOF
|
|
|
|
expect <<EOF
|
|
N=## {
|
|
<3: { X=* }
|
|
>2: { Y=* }
|
|
}
|
|
EOF
|
|
|
|
###############################################################################
|