Skip to content

Commit

Permalink
Change test is-not to is-nil?.
Browse files Browse the repository at this point in the history
  • Loading branch information
niyarin committed Jul 4, 2023
1 parent 8a5a80d commit 79954bf
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/cljam/io/vcf/util/validator_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

(deftest check-each-samples-test
(testing "type check"
(is (not
(is (nil?
(#'validator/check-each-samples
{:normal {:DP 100}} [:normal]
{:DP {:type "Integer" :number 1}})))
Expand All @@ -19,29 +19,29 @@
{:DP {:type "Integer" :number 1}})
[:normal :DP])
["Not match type declaration. Requires Integer , but [\"str100\"]."]))
(is (not
(is (nil?
(#'validator/check-each-samples
{:normal {:GT "1|0"}} [:normal]
{:GT {:type "String" :number 1}})))
(is (not
(is (nil?
(#'validator/check-each-samples
{:normal {:A [1 2]}} [:normal]
{:A {:type "Integer" :number 2}}))))

(testing "number check"
(is (not
(is (nil?
(#'validator/check-each-samples
{:normal {:A [1 2]} :alt ["A" "T"]} [:normal]
{:A {:type "Integer" :number 2}})))
(is (not
(is (nil?
(#'validator/check-each-samples
{:normal {:A [1 2]} :alt ["A" "T"]} [:normal]
{:A {:type "Integer" :number "A"}})))
(is (not
(is (nil?
(#'validator/check-each-samples
{:normal {:A [1 2 3]} :alt ["A" "T"]} [:normal]
{:A {:type "Integer" :number "R"}})))
(is (not
(is (nil?
(#'validator/check-each-samples
{:normal {:A [1 2 3 4 5 6]} :alt ["A" "T"]} [:normal]
{:A {:type "Integer" :number "G"}})))
Expand All @@ -67,7 +67,7 @@

(deftest invalid-variant?-test
(testing "contig check"
(is (not
(is (nil?
(validator/invalid-variant?
{:chr "chr10" :pos 10}
{:contig [{:id "chr10"}]}
Expand All @@ -94,32 +94,32 @@
{:contig [{:id "chr10"}]}
base-header))
["Must be sequence."]))
(is (not
(is (nil?
(validator/invalid-variant?
{:chr "chr10" :pos 10 :alt ["A" "<DEL>" nil]}
{:contig [{:id "chr10"}]}
base-header)))
(is (not
(is (nil?
(validator/invalid-variant?
{:chr "chr10" :pos 10 :alt ["G]17:198982]"
"]13:123456]T"]}
{:contig [{:id "chr10"}]}
base-header))))
(testing "qual check"
(is (not
(is (nil?
(validator/invalid-variant?
{:chr "chr10" :pos 10
:qual 0.1}
{:contig [{:id "chr10"}]}
base-header))))
(testing "filter check"
(is (not
(is (nil?
(validator/invalid-variant?
{:chr "chr10" :pos 10
:filter :PASS}
{:contig [{:id "chr10"}]}
base-header)))
(is (not
(is (nil?
(validator/invalid-variant?
{:chr "chr10" :pos 10
:filter [:q10 :s5]}
Expand All @@ -133,7 +133,7 @@
{}
base-header))
(testing "format check"
(is (not
(is (nil?
(validator/invalid-variant?
{:chr "chr10" :pos 10
:FORMAT ["A"]}
Expand Down

0 comments on commit 79954bf

Please sign in to comment.