Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 62 additions and 62 deletions.
  1. +61 −61 UT.dyalog
  2. +1 −1 requirement_specification.org
View
122 UT.dyalog
@@ -2,13 +2,6 @@
EN
- Z LHS eq RHS
- Z 1
- :If LHS RHS
- Z LHS RHS
- :EndIf
-
-
Z run Function;Res;Tmp
Tmp 1 ⎕RSI
Tmp ( ⎕THIS) ⎕NS (( Tmp),'.',Function)
@@ -41,6 +34,57 @@ EN ← ⍬
⎕EX Function
+ Z run_file Path;TmpSpace;Fns;Res;Passed;Failed;Exception
+ 'TmpSpace' ⎕NS ''
+ 'TmpSpace' ⎕NS '#.DISPLAY'
+ {'TmpSpace' ⎕NS } ¨ #.UT.⎕NL 3
+ {'TmpSpace' ⎕NS } ¨ #.UT.⎕NL 2
+ ⎕CS 'TmpSpace'
+ ⎕SE.SALT.Load Path
+ ⎕CS get_namespace
+ { ( ⎕THIS) ⎕NS '#.UT.', } ¨ #.UT.⎕NL 3
+ { ( ⎕THIS) ⎕NS '#.UT.', } ¨ #.UT.⎕NL 2
+ Fns ⎕THIS.⎕NL 3
+ Fns ( is_test ¨ Fns) / Fns
+ Res run ¨ Fns
+ (Passed Exception Failed) (+/1=Res) (+/0Res1Res) (+/0=Res)
+ print_file_result Passed Exception Failed
+ ⎕CS ##
+ ⎕CS ##
+ ⎕EX 'TmpSpace'
+ Z Passed Exception Failed
+
+
+ Z run_group Group;Res
+ ⎕CS 1 ⎕RSI
+ Res #.UT.run ¨ ( Group)
+ ⎕CS #.UT
+ Res (+/1=Res) (+/0Res1Res) (+/0=Res)
+ Group print_group_result Res
+ Z Res
+
+
+ Z Group run_group_file Path;Res
+ 'TmpSpace' ⎕NS ''
+ ⎕CS 'TmpSpace'
+ ⎕SE.SALT.Load Path
+ ⎕CS ⎕NL 9
+ Res #.UT.run ¨ Group
+ ⎕CS ##
+ ⎕EX 'TmpSpace'
+ ⎕CS #.UT
+ Res (+/1=Res) (+/0Res1Res) (+/0=Res)
+ Group print_file_group_result Res
+ Z Res
+
+
+ Z LHS eq RHS
+ Z 1
+ :If LHS RHS
+ Z LHS RHS
+ :EndIf
+
+
Z execute_function Name;R;C
(R C) ⎕CR Name
:If R > 1
@@ -50,20 +94,6 @@ EN ← ⍬
:EndIf
- Name display_expected_got Res
- 'FAILED:',function_header Name
- 'Expected'
- show_term Res[1]
- 'Got'
- show_term Res[2]
-
-
- display_exception Name
- 'EXCEPTION:',function_header Name
- ' EN:',⎕EN
- ⎕DM
-
-
Z function_header Name;Matrix;R;C
Matrix ⎕CR Name
@@ -84,27 +114,6 @@ EN ← ⍬
:EndIf
- Z run_file Path;TmpSpace;Fns;Res;Passed;Failed;Exception
- 'TmpSpace' ⎕NS ''
- 'TmpSpace' ⎕NS '#.DISPLAY'
- {'TmpSpace' ⎕NS } ¨ #.UT.⎕NL 3
- {'TmpSpace' ⎕NS } ¨ #.UT.⎕NL 2
- ⎕CS 'TmpSpace'
- ⎕SE.SALT.Load Path
- ⎕CS get_namespace
- { ( ⎕THIS) ⎕NS '#.UT.', } ¨ #.UT.⎕NL 3
- { ( ⎕THIS) ⎕NS '#.UT.', } ¨ #.UT.⎕NL 2
- Fns ⎕THIS.⎕NL 3
- Fns ( is_test ¨ Fns) / Fns
- Res run ¨ Fns
- (Passed Exception Failed) (+/1=Res) (+/0Res1Res) (+/0=Res)
- print_file_result Passed Exception Failed
- ⎕CS ##
- ⎕CS ##
- ⎕EX 'TmpSpace'
- Z Passed Exception Failed
-
-
Z get_namespace
Z ⎕NL 9
@@ -118,27 +127,18 @@ EN ← ⍬
Z '_TEST' ¯5 Tmp
- Z run_group Group;Res
- ⎕CS 1 ⎕RSI
- Res #.UT.run ¨ ( Group)
- ⎕CS #.UT
- Res (+/1=Res) (+/0Res1Res) (+/0=Res)
- Group print_group_result Res
- Z Res
+ Name display_expected_got Res
+ 'FAILED:',function_header Name
+ 'Expected'
+ show_term Res[1]
+ 'Got'
+ show_term Res[2]
- Z Group run_group_file Path;Res
- 'TmpSpace' ⎕NS ''
- ⎕CS 'TmpSpace'
- ⎕SE.SALT.Load Path
- ⎕CS ⎕NL 9
- Res #.UT.run ¨ Group
- ⎕CS ##
- ⎕EX 'TmpSpace'
- ⎕CS #.UT
- Res (+/1=Res) (+/0Res1Res) (+/0=Res)
- Group print_file_group_result Res
- Z Res
+ display_exception Name
+ 'EXCEPTION:',function_header Name
+ ' EN:',⎕EN
+ ' EM:',⎕EM ⎕EN
print_file_result Result
View
2 requirement_specification.org
@@ -236,7 +236,7 @@ exception as
The return value of a test failing due to exception
is the event number.
-** [o] Test Groups
+** [d] Test Groups
A test group is an array of test function names. It shall be possible
to create test groups and execute only a certain group.

No commit comments for this range

Something went wrong with that request. Please try again.