Actually just three programming languages in a trenchcoat
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add section on tests

+24 -1
+1
spec/src/_preamble.tex
··· 61 61 morekeywords=[3]{rule,is,ft,given,and,or}, 62 62 morekeywords=[4]{when,cancel,resume,invert,yield}, 63 63 morekeywords=[5]{module,import,from,use,export,at}, 64 + morekeywords=[6]{test,assert}, 64 65 morestring=[b]{"}, 65 66 morestring=[s]{$"}{"}, 66 67 morecomment=[l]{\#},
+1 -1
spec/src/overview/additional-features/documentation.tri
··· 14 14 proc main!() { 15 15 loop { 16 16 let inputNumber = Int readline!() 17 - when 'EOF cancel break # done 17 + when 'EOF cancel break # done 18 18 when 'NAN cancel #- default when invalid: -# 0 19 19 println!(double inputNumber) 20 20 }
+12
spec/src/overview/additional-features/index.tex
··· 94 94 author desires, but more importantly, can exported locally alongside the 95 95 documentation of all other referenced code, so it can be found in a 96 96 predictable location alongside any project that uses it. 97 + 98 + \subsubsection{Testing} 99 + 100 + Tests are defined similarly to procedures, but using the keyword \kw{test} 101 + instead of \kw{proc}. A test is run as if it was the entrypoint to the 102 + application. If execution reaches the end successfully, the test is 103 + considered a success; otherwise it is a failure. 104 + 105 + \inputcode{tests.tri} 106 + 107 + To make tests easier to write, the \kw{assert} keyword will abort the 108 + current process when its parameter does not evaluate to \val{true}.
+10
spec/src/overview/additional-features/tests.tri
··· 1 + func double x = x * 2 2 + func triple x = x * 4 # uh oh 3 + 4 + test can_double!() { 5 + assert double 2 == 4 6 + } 7 + 8 + test can_triple() { 9 + assert triple 2 == 6 10 + }