diff options
author | Akira TAGOH <akira@tagoh.org> | 2006-09-23 14:33:06 +0000 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2006-09-23 14:33:06 +0000 |
commit | 5e84d6e6989baeed31d4ebecdf99b8d9e441b531 (patch) | |
tree | 4c1c23107377340f927b3f89d01043c34c163cef /tests | |
parent | eb3c03df98615de3d3dd9be4a4ee613ae6a3863a (diff) |
2006-09-23 Akira TAGOH <at@gclab.org>
* hieroglyph/operator.c (_hg_operator_op_add): fixed a overflow.
* hieroglyph/hgvaluenode.c (hg_value_node_compare): use macro.
* tests/ps/test-add.ps: new test case.
* src/hgs.c (main): returns an error code.
* plugins/test/hg_unittest.ps (unittestresult): stop with an error code
when unit test failed.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ps/test-add.ps | 20 | ||||
-rwxr-xr-x | tests/ps/test-ps.sh | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/ps/test-add.ps b/tests/ps/test-add.ps new file mode 100644 index 0000000..6c05e4c --- /dev/null +++ b/tests/ps/test-add.ps @@ -0,0 +1,20 @@ +initunittest + +[7] null true initunittestdict {3 4 add} unittest +[11.0] null true initunittestdict {9.9 1.1 add} unittest +[/foo 1] /typecheck true initunittestdict {/foo 1 add} unittest +[1 /foo] /typecheck true initunittestdict {1 /foo add} unittest +[[] 1] /typecheck true initunittestdict {[] 1 add} unittest +[1 []] /typecheck true initunittestdict {1 [] add} unittest +[1 dict 1] /typecheck true initunittestdict {1 dict 1 add} unittest +[1 1 dict] /typecheck true initunittestdict {1 1 dict add} unittest +{//mark 1} cvlit /typecheck true initunittestdict {mark 1 add} unittest +{1 //mark} cvlit /typecheck true initunittestdict {1 mark add} unittest +[null 1] /typecheck true initunittestdict {null 1 add} unittest +[1 null] /typecheck true initunittestdict {1 null add} unittest +[] /stackunderflow true initunittestdict {add} unittest +[1] /stackunderflow true initunittestdict {1 add} unittest +[4.29490176e+09] null true initunittestdict {2147450880 2147450880 add} unittest +[] null true initunittestdict {2.25176549e+38 2.25176549e+38 add} unittest + +unittestresult diff --git a/tests/ps/test-ps.sh b/tests/ps/test-ps.sh index 5b83c23..b4bbd53 100755 --- a/tests/ps/test-ps.sh +++ b/tests/ps/test-ps.sh @@ -1,5 +1,7 @@ #! /bin/sh +set -e + rootdir=`dirname $0`/../.. export HIEROGLYPH_LIB_PATH=$rootdir/plugins/test for i in `dirname $0`/test-*.ps; do |