diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2020-12-09 02:43:12 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-09 02:43:12 +0000 |
| commit | 97cace20fbc847723804c3e083659cb1858e3f62 (patch) | |
| tree | cf5e6bd598b316bf7495dd3cd23151abcf0f0cb0 /challenge-090/tyler-wardhaugh/lua/test.lua | |
| parent | 51557861bf81c9335207b17b76f71cf8e48ac999 (diff) | |
| parent | ec53034d57fe6d3a652c29ad0f6b6ba33d8ed848 (diff) | |
| download | perlweeklychallenge-club-97cace20fbc847723804c3e083659cb1858e3f62.tar.gz perlweeklychallenge-club-97cace20fbc847723804c3e083659cb1858e3f62.tar.bz2 perlweeklychallenge-club-97cace20fbc847723804c3e083659cb1858e3f62.zip | |
Merge pull request #2953 from tylerw/tw/challenge-090
Challenge 090
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) |
