Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

some Types tests; I don't think exporting is implemented yet

  • Loading branch information...
commit 1ca57f480627ae19d0605fa10e58fc435d86f59d 1 parent e2de8e7
Chris Fields authored
Showing with 11 additions and 97 deletions.
  1. +0 −93 lib/Bio/Types.pir
  2. +11 −4 t/Types.t
93 lib/Bio/Types.pir
View
@@ -1,93 +0,0 @@
-
-.HLL "perl6"
-
-.namespace []
-.sub "_block11" :anon :subid("10_1268431459.78469")
- .param pmc param_33 :slurpy
-.annotate "line", 0
- .const 'Sub' $P15 = "11_1268431459.78469"
- capture_lex $P15
-.annotate "line", 1
- get_hll_global $P13, "!UNIT_START"
- .const 'Sub' $P15 = "11_1268431459.78469"
- capture_lex $P15
- .lex "@_", param_33
- .tailcall $P13($P15, param_33)
- .const 'Sub' $P38 = "14_1268431459.78469"
- .return ($P38)
-.end
-
-
-.HLL "perl6"
-
-.namespace []
-.sub "_block14" :anon :subid("11_1268431459.78469") :outer("10_1268431459.78469")
-.annotate "line", 1
- get_hll_global $P24, ["Bio";"Types"], "_block23"
- capture_lex $P24
- .local pmc true
- true = get_hll_global 'True'
- .lex "__CANDIDATE_LIST__", $P16
- find_lex_skip_current $P17, "$_"
- $P18 = new ['Perl6Scalar'], $P17
- setprop $P18, "rw", true
- .lex "$_", $P18
- find_lex_skip_current $P19, "$/"
- $P20 = new ['Perl6Scalar'], $P19
- setprop $P20, "rw", true
- .lex "$/", $P20
- find_lex_skip_current $P21, "$!"
- $P22 = new ['Perl6Scalar'], $P21
- setprop $P22, "rw", true
- .lex "$!", $P22
- get_hll_global $P24, ["Bio";"Types"], "_block23"
- capture_lex $P24
- $P32 = $P24()
- .return ($P32)
-.end
-
-
-.HLL "perl6"
-
-.namespace ["Bio";"Types"]
-.sub "_block23" :subid("12_1268431459.78469") :outer("11_1268431459.78469")
-.annotate "line", 1
- .local pmc true
- true = get_hll_global 'True'
- .lex "__CANDIDATE_LIST__", $P25
- find_lex_skip_current $P26, "$_"
- $P27 = new ['Perl6Scalar'], $P26
- setprop $P27, "rw", true
- .lex "$_", $P27
- find_lex_skip_current $P28, "$/"
- $P29 = new ['Perl6Scalar'], $P28
- setprop $P29, "rw", true
- .lex "$/", $P29
- find_lex_skip_current $P30, "$!"
- $P31 = new ['Perl6Scalar'], $P30
- setprop $P31, "rw", true
- .lex "$!", $P31
- .return ()
-.end
-
-
-.HLL "perl6"
-
-.namespace []
-.sub "_block34" :load :init :anon :subid("13_1268431459.78469")
-.annotate "line", 1
- $P36 = "!fire_phasers"("CHECK")
- .return ($P36)
-.end
-
-
-.HLL "perl6"
-
-.namespace []
-.sub "_block37" :load :anon :subid("14_1268431459.78469")
-.annotate "line", 1
- .const 'Sub' $P39 = "10_1268431459.78469"
- $P40 = "!UNIT_START"($P39)
- .return ($P40)
-.end
-
15 t/Types.t
View
@@ -1,10 +1,16 @@
use v6;
-use Test;
+BEGIN {
+ @*INC.push('./lib');
+}
-plan 25;
+use Test;
-use Bio::Types;
+# TODO: these should probably become enums
+subset SeqAlphabet where .lc ~~ any <dna rna protein>;
+subset SeqStrandInt where any <-1 0 1>;
+subset SeqStrandChar where any <- . +>;
+subset SeqStrand where { $_ ~~ SeqStrandChar || $_ ~~ SeqStrandInt};
for -2..2 -> $a {
if -1 <= $a <= 1 {
@@ -26,9 +32,10 @@ for <! - . + z> -> $a {
}
}
-ok('dna' ~~ SeqAlphabet);
+ok('dna' ~~ SeqAlphabet, 'some alphabet tests');
ok('DNA' ~~ SeqAlphabet);
ok('rna' ~~ SeqAlphabet);
ok('protein' ~~ SeqAlphabet);
ok('foo' !~~ SeqAlphabet);
+done_testing;
Please sign in to comment.
Something went wrong with that request. Please try again.