about summary refs log tree commit diff stats
path: root/docs/profanity.1
diff options
context:
space:
mode:
Diffstat (limited to 'docs/profanity.1')
0 files changed, 0 insertions, 0 deletions
mmitter Kartik K. Agaram <vc@akkartik.com> 2015-07-04 09:40:50 -0700 1702 - experiment: start using 'ordinal' in names' href='/akkartik/mu/commit/026assert.cc?h=hlt&id=363be37f3f41db063ced940e310d6bba6ef82ef3'>363be37f ^
5f6cf062 ^

ac0e9db5 ^

0487a30e ^
ab6ed192 ^
dc1323e9 ^
0487a30e ^
5f6cf062 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
                  
                                                                                                                                                               







                                             
                                  

                                                

                                    
                                 
                                                                
                                                                           
   

        
:(scenario assert)
% Hide_warnings = true;  // '%' lines insert arbitrary C code into tests before calling 'run' with the lines below. Must be immediately after :(scenario) line.
recipe main [
  assert 0:literal, [this is an assert in mu]
]
+warn: this is an assert in mu

:(before "End Primitive Recipe Declarations")
ASSERT,
:(before "End Primitive Recipe Numbers")
Recipe_ordinal["assert"] = ASSERT;
:(before "End Primitive Recipe Implementations")
case ASSERT: {
  assert(SIZE(ingredients) == 2);
  assert(scalar(ingredients.at(0)));
  if (!ingredients.at(0).at(0)) {
    assert(is_literal(current_instruction().ingredients.at(1)));
    raise << current_instruction().ingredients.at(1).name << '\n' << die();
  }
  break;
}