mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 00:38:14 +01:00
Prove "assert true".
This commit is contained in:
1 parent
c736c1c509
commit
d3eba13223
2 files changed
+7
-1
No files matched your search
@@ -56,7 +56,11 @@ func (q *checker) bcheckStatement(n *a.Node) error {
|
||||
n := n.Assert()
|
||||
condition := n.Condition()
|
||||
err := errFailed
|
||||
if reasonID := n.Reason(); reasonID != 0 {
|
||||
if cv := condition.ConstValue(); cv != nil {
|
||||
if cv.Cmp(one) == 0 {
|
||||
err = nil
|
||||
}
|
||||
} else if reasonID := n.Reason(); reasonID != 0 {
|
||||
if reasonFunc := q.reasonMap[reasonID.Key()]; reasonFunc != nil {
|
||||
err = reasonFunc(q, n)
|
||||
} else {
|
||||
|
||||
@@ -68,6 +68,8 @@ func TestCheck(t *testing.T) {
|
||||
var p i32
|
||||
var q i32[0:8]
|
||||
|
||||
assert true
|
||||
|
||||
while p == q,
|
||||
post p != q,
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user