-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from anzx/feature/prettier_test_results
Feature/prettier test results
- Loading branch information
Showing
32 changed files
with
1,023 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Test case examples | ||
|
||
This directory has the following examples of arr.ai test cases: | ||
This directory has the following examples of arr.ai test cases which uses the new leaf-true structure: | ||
- **[Single test case in one test file](single_case_test.arrai)**: Only one test case in an arr.ai test file. | ||
- **[Multiple test cases in one test file](multiple_cases_test.arrai):** Multiple test cases in an arr.ai test file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,31 @@ | ||
# 5 test cases | ||
let str = "Hello, arrai!"; | ||
( | ||
# Added expression let to clarify the actual result can be a complex expression | ||
testCase1: //test.assert.equal("Hello, arrai!", let words = ["Hello", "arrai!"];//seq.join(", ", words)), | ||
testCase2: //test.assert.unequal("Hello, arrai!", //seq.join(", ", ["Nihao", "arrai!"])), | ||
testCase3: //test.assert.size(2, {"Hello", "arrai!"}), | ||
testCase4: //test.assert.true({"Hello", "arrai!"}), | ||
testCase5: //test.assert.false({}), | ||
tuple: | ||
( | ||
testCase1: str = let words = ["Hello", "arrai!"];//seq.join(", ", words), | ||
testCase2: str != //seq.join(", ", ["Nihao", "arrai!"]), | ||
# notATest1: 5, | ||
# notATest2: { 1 = 1, 2 = 1 }, | ||
#_ignoredTest: 1 = 2, | ||
), | ||
#_ignoredContainer: | ||
#( | ||
# testCase1: 1 = 2, | ||
# _testCase2: 1 = 2, | ||
#), | ||
testCase3: 2 = {"Hello", "arrai!"} count, | ||
dict: | ||
{ | ||
# "testCase4": 4 = 7, | ||
"testCase5": (a: 5 = 5, b: 6 = 6), | ||
}, | ||
array: | ||
[ | ||
7 = 7, | ||
[8 = 8, (a: 9 = 9, b: 10 = 10)], | ||
let value = {str}; cond {value: true} = true, | ||
let value = {}; cond {value: true} = false, | ||
#true = false, | ||
], | ||
deep: (deeper: (deepest: 9 = 9)), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
//test.assert.equal("Hello", //str.title("hello")) | ||
"Hello" = //str.title("hello") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Test case examples | ||
|
||
This directory has the following examples of arr.ai test cases using the obsolete assert functions: | ||
- **[Single test case in one test file](single_case_test.arrai)**: Only one test case in an arr.ai test file. | ||
- **[Multiple test cases in one test file](multiple_cases_test.arrai):** Multiple test cases in an arr.ai test file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 5 test cases | ||
( | ||
# Added expression let to clarify the actual result can be a complex expression | ||
testCase1: //test.assert.equal("Hello, arrai!", let words = ["Hello", "arrai!"];//seq.join(", ", words)), | ||
testCase2: //test.assert.unequal("Hello, arrai!", //seq.join(", ", ["Nihao", "arrai!"])), | ||
testCase3: //test.assert.size(2, {"Hello", "arrai!"}), | ||
testCase4: //test.assert.true({"Hello", "arrai!"}), | ||
testCase5: //test.assert.false({}), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//test.assert.equal("Hello", //str.title("hello")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package test | ||
|
||
import "time" | ||
|
||
type testFile struct { | ||
path string | ||
source string | ||
wallTime time.Duration | ||
results []testResult | ||
} | ||
|
||
type testResult struct { | ||
name string | ||
outcome testOutcome | ||
message string | ||
} | ||
|
||
type testOutcome int | ||
|
||
const ( | ||
Failed testOutcome = iota | ||
Invalid | ||
Ignored | ||
Passed | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.