diff options
author | Samuel Lidén Borell <samuel@kodafritt.se> | 2024-06-02 21:20:48 +0200 |
---|---|---|
committer | Samuel Lidén Borell <samuel@kodafritt.se> | 2024-06-02 21:20:48 +0200 |
commit | 580bf6130632f6855fddeea7b07c8401c56108f2 (patch) | |
tree | 4bd5e7cdb68408c52ad8df030f7f887c7d97def0 /notes/compilation_failure_testing.txt | |
parent | db73835b12f41be8766384a1cdcc34a0848354dc (diff) | |
download | slul-main.tar.gz slul-main.tar.bz2 slul-main.zip |
Diffstat (limited to 'notes/compilation_failure_testing.txt')
-rw-r--r-- | notes/compilation_failure_testing.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/notes/compilation_failure_testing.txt b/notes/compilation_failure_testing.txt new file mode 100644 index 0000000..59e8c22 --- /dev/null +++ b/notes/compilation_failure_testing.txt @@ -0,0 +1,31 @@ +Compilation failure testing +=========================== + +With more advanced type systems and/or parameter constraints, it can be +useful to be able to check that those are enforced correctly. + +That could be done with some kind of special test. +There is apparently something like this being use in Rust, +see nolife/counterexamples. + +Should something like this be added to SLUL? +What should the syntax be like? + +Syntax 1: Extend long/nestable comments +--------------------------------------- + + #{{nocompile + func test() + { + # ERROR: .*Invalid code.* + invalid + } + #}} + +Syntax 2: Special keywords +-------------------------- + + noncompiling func test() + { + bad(invalid) + } |