1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#!/usr/bin/env raku
use Test;
use JSON::Fast;
use lib $?FILE.IO.dirname;
use RNA;
plan 6;
my @test-cases = from-json($=pod[*-1].contents).List;
for @test-cases -> %case {
is to-rna(%case<input><dna>), |%case<expected description>;
}
=head2 Test Cases
=begin code
[
{
"description": "Empty RNA sequence",
"expected": "",
"input": {
"dna": ""
},
"property": "toRna"
},
{
"description": "RNA complement of cytosine is guanine",
"expected": "G",
"input": {
"dna": "C"
},
"property": "toRna"
},
{
"description": "RNA complement of guanine is cytosine",
"expected": "C",
"input": {
"dna": "G"
},
"property": "toRna"
},
{
"description": "RNA complement of thymine is adenine",
"expected": "A",
"input": {
"dna": "T"
},
"property": "toRna"
},
{
"description": "RNA complement of adenine is uracil",
"expected": "U",
"input": {
"dna": "A"
},
"property": "toRna"
},
{
"description": "RNA complement",
"expected": "UGCACCAGAAUU",
"input": {
"dna": "ACGTGGTCTTAA"
},
"property": "toRna"
}
]
=end code
|