Skip to content

Commit 6640012

Browse files
authored
Merge pull request #8 from bkamins/tests_all_between
add tests to Between and All
2 parents 08fe1d7 + 79c0819 commit 6640012

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/runtests.jl

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,30 @@ end
2727

2828
end
2929

30+
@testset "Between" begin
31+
32+
for x in (1, :a), y in (1, :a)
33+
b = DataAPI.Between(x, y)
34+
@test b.first == x
35+
@test b.last == y
36+
end
37+
38+
@test_throws MethodError DataAPI.Between(true, 1)
39+
@test_throws MethodError DataAPI.Between(:a, 0x01)
40+
41+
end
42+
43+
@testset "All" begin
44+
45+
@test DataAPI.All().cols == ()
46+
@test DataAPI.All(1).cols == (1,)
47+
@test DataAPI.All([1,2,3], :a).cols == ([1, 2, 3], :a)
48+
49+
a = DataAPI.All(DataAPI.All())
50+
@test length(a.cols) == 1
51+
@test a.cols[1] isa DataAPI.All
52+
@test a.cols[1].cols == ()
53+
54+
end
55+
3056
end # @testset "DataAPI"

0 commit comments

Comments
 (0)