summaryrefslogtreecommitdiffstats
path: root/tests/common.tl
Commit message (Collapse)AuthorAgeFilesLines
* ifa: fix broken/invalid test case.Kaz Kylheku2020-04-231-2/+2
| | | | | | | | | | | | | | | | | | * tests/012/ifa.tl: The "ambiguous" test case is not ambiguous at all. The reason it was yielding :error previously was not due to the ifa macro identifying an ambiguity but due to the funcion < not accepting nil arguments. Since < now does accept nil arguments, this test broke. Fixing this test, and adding one that tests for the ambiguous case: multiple it-candidates being rejected by ifa at expansion time. * tests/common.tl (vtest): This macro requires maintenance. To test for expansion-time failure, we must use expand, not just macroexpand. In this case, the (ifa ...) macro call is wrapped in a (let ...) so macroexpand won't do it. Secondly, the expected value is an quote expression that must be evaluated if we need its value in vtest itself. Otherwise it won't compare equal to :error, since it is actually (quote :error).
* tests: first FFI regression test case.Kaz Kylheku2017-05-131-0/+5
| | | | | | | | | | | * tests/017/qsort.expected: New file. * tests/017/qsort.tl: New file. * tests/common.tl (libc): New function. * Makefile (tst/tests/017/%): Clear TXR_DBG_OPTS so the GC stress test isn't applied to tests in this directory.
* tests: use internal OS identification method.Kaz Kylheku2017-05-131-3/+9
| | | | | | | | | | * tests/common.tl (osname): Function based on calling shell command removed. (os-symbol): New symbol-returning function based on uname system call. * tests/014/dgram-stream.tl (dgram-test): Use os-symbol function rather than osname.
* Adding tests for split-str.Kaz Kylheku2016-09-171-0/+3
| | | | | | | | * Makefile (TXR_DBG_OPTS): Disable for tst/tests/015. * tests/common.tl (mtest): New macro. * tests/015/split.tl: New file.
* Run IPv6 tests only on some operating systems.Kaz Kylheku2016-03-101-0/+4
| | | | | | | | | | * tests/014/dgram-stream.tl (test): Renamed to dgram-test since now this includes common.tl which has a macro called test. Only include af-inet6 in the family list if the OS is GNU/Linux, Darwin or Cygwin. * tests/common.tl (osname): New function.
* Adding struct tests.Kaz Kylheku2015-09-021-4/+12
| | | | | | | | | | | | * tests/common.tl (vtest): New macro based on test. Evaluates the expected expression. (test): Becomes a wrapper for vtest which quotes the expected expression. (stest): New macro for string-based comparison of output. * tests/012/struct.expected: New file. * tests/012/struct.tl: New file.
* Split off test macros from ifa.tl into common file.Kaz Kylheku2015-07-231-0/+13
* Makefile (TESTS_OUT): Don't use find to hunt down tests; but rather wildcard. This way common.tl is not mistakenly identified as an independent test file. * tests/012/ifa.tl: Removed test code, placed in new file which is loaded. * tests/common.tl: New file.