Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/run.moon
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ write_results = (slug, test_results, names, bodies, dir) ->
for name in *names
test = test_results[name]
assert test, "no test result for #{name}"
status = 'fail' if test.status == 'fail'
status = 'fail' if test.status != 'pass'
test.test_code = bodies[name]
table.insert results.tests, test
results.status = status
Expand Down
2 changes: 1 addition & 1 deletion tests/example-partial-error/expected_results.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"tests":[{"message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","status":"error","test_code":" result = hamming.distance '', ''\n assert.are.equal 0, result\n","name":"empty strands"},{"message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","status":"error","test_code":" result = hamming.distance 'A', 'A'\n assert.are.equal 0, result\n","name":"single letter identical strands"},{"message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","status":"error","test_code":" result = hamming.distance 'G', 'T'\n assert.are.equal 1, result\n","name":"single letter different strands"},{"message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","status":"error","test_code":" result = hamming.distance 'GGACTGAAATCTG', 'GGACTGAAATCTG'\n assert.are.equal 0, result\n","name":"long identical strands"},{"message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","status":"error","test_code":" result = hamming.distance 'GGACGGATTCTG', 'AGGACGGATTCT'\n assert.are.equal 9, result\n","name":"long different strands"},{"status":"pass","test_code":" f = -> hamming.distance 'AATG', 'AAA'\n assert.has.error f, 'strands must be of equal length'\n","name":"disallow first strand longer"},{"status":"pass","test_code":" f = -> hamming.distance 'ATA', 'AGTG'\n assert.has.error f, 'strands must be of equal length'\n","name":"disallow second strand longer"},{"status":"pass","test_code":" f = -> hamming.distance '', 'G'\n assert.has.error f, 'strands must be of equal length'\n","name":"disallow empty first strand"},{"status":"pass","test_code":" f = -> hamming.distance 'G', ''\n assert.has.error f, 'strands must be of equal length'\n","name":"disallow empty second strand"}],"status":"pass","version":2}
{"status":"fail","tests":[{"status":"error","test_code":" result = hamming.distance '', ''\n assert.are.equal 0, result\n","message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","name":"empty strands"},{"status":"error","test_code":" result = hamming.distance 'A', 'A'\n assert.are.equal 0, result\n","message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","name":"single letter identical strands"},{"status":"error","test_code":" result = hamming.distance 'G', 'T'\n assert.are.equal 1, result\n","message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","name":"single letter different strands"},{"status":"error","test_code":" result = hamming.distance 'GGACTGAAATCTG', 'GGACTGAAATCTG'\n assert.are.equal 0, result\n","message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","name":"long identical strands"},{"status":"error","test_code":" result = hamming.distance 'GGACGGATTCTG', 'AGGACGGATTCT'\n assert.are.equal 9, result\n","message":"./example_partial_error.moon:5: attempt to call a number value (for iterator 'for iterator')","name":"long different strands"},{"status":"pass","test_code":" f = -> hamming.distance 'AATG', 'AAA'\n assert.has.error f, 'strands must be of equal length'\n","name":"disallow first strand longer"},{"status":"pass","test_code":" f = -> hamming.distance 'ATA', 'AGTG'\n assert.has.error f, 'strands must be of equal length'\n","name":"disallow second strand longer"},{"status":"pass","test_code":" f = -> hamming.distance '', 'G'\n assert.has.error f, 'strands must be of equal length'\n","name":"disallow empty first strand"},{"status":"pass","test_code":" f = -> hamming.distance 'G', ''\n assert.has.error f, 'strands must be of equal length'\n","name":"disallow empty second strand"}],"version":2}
Loading