aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/compilation_failure_testing.txt
blob: 59e8c22ce4abc40b0757985232c4bdc29ebd4f6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)
    }