diff options
Diffstat (limited to 'challenge-090/tyler-wardhaugh/lua/test.lua')
| -rwxr-xr-x | challenge-090/tyler-wardhaugh/lua/test.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/challenge-090/tyler-wardhaugh/lua/test.lua b/challenge-090/tyler-wardhaugh/lua/test.lua new file mode 100755 index 0000000000..7dffde2f53 --- /dev/null +++ b/challenge-090/tyler-wardhaugh/lua/test.lua @@ -0,0 +1,21 @@ +#!/usr/bin/env lua + +require 'busted.runner'() + +describe("Task 1, DNA Sequence", function() + local t1 = require'ch-1' + it("produces correct results for the examples", function() + local freq, complement = t1.process_dna(t1.DEFAULT_DNA) + assert.are.same({G=13, T=22, A=14, C=18 }, freq) + assert.are.same('CATTTGGGGAAAAGTAAATCTGTCTAGCTGAGGAATAGGTAAGAGTCTCTACACAACGACCAGCGGC', + complement) + end) +end) + +describe("Task 2, Ethiopian Multiplication", function() + local t2 = require'ch-2' + it("produces correct results for the examples", function() + assert.are.same(168, t2.ethiopian_multiply(12, 14)) + assert.are.same(1554, t2.ethiopian_multiply(37, 42)) + end) +end) |
