xref: /aosp_15_r20/external/one-true-awk/testdir/t.assert (revision 9a7741de182b2776d7b30d6355f2585c0780a51b)
1*9a7741deSElliott Hughes# tests whether function returns sensible type bits
2*9a7741deSElliott Hughes
3*9a7741deSElliott Hughesfunction assert(cond) { # assertion
4*9a7741deSElliott Hughes    if (!cond) print "   >>> assert failed <<<"
5*9a7741deSElliott Hughes}
6*9a7741deSElliott Hughes
7*9a7741deSElliott Hughesfunction i(x) { return x }
8*9a7741deSElliott Hughes
9*9a7741deSElliott Hughes{ m = length($1); n = length($2); n = i(n); assert(m > n) }
10