diff options
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) + } |