:/ So, I [tried to add a 
test](https://github.com/akavel/macromatch/blob/c494cd6b2e141323895417da77fb101517583478/tests/test1.nim),
 but it doesn't really seem to work with the usual approach in a `static:` 
block:
    
    
    $ cat tests/test1.nim
    import unittest
    import macros
    
    import macromatch
    
    static:
      test "simple ident":
        let
          t1 = ident("foobar")
        check t1 =~ Ident(_)
        check t1 =~ Ident("foobar")
        check t1 !~ Empty(_)
        check t1 !~ StmtList(_)
    $ nimble test
    ...
    /nix/store/...-nim-0.20.2/lib/pure/unittest.nim(480, 5) Error: cannot 
evaluate at compile time: checkpoints
         Error: Execution failed with exit code 1
            ... Command: "/nix/store/...-nim-0.20.2/bin/nim" c --noNimblePath 
"-r" "--path:."  "/home/akavel/prog/macromatch/tests/test1.nim"
    
    
    Run

If I remove the `test "simple ident":` line (and adjust indentation), I'm 
getting:
    
    
    .../lib/pure/unittest.nim(543, 5) Error: cannot evaluate at compile time: 
programResult
         Error: Execution failed with exit code 1
            ... Command: "/nix/store/...-nim-0.20.2/bin/nim" c --noNimblePath 
"-r" "--path:."  "/home/akavel/prog/macromatch/tests/test1.nim"
    
    
    Run

Reply via email to