Permalink
Browse files

Add Integer dim Tests (#32)

  • Loading branch information...
mcmcgrath13 authored and nalimilan committed Sep 5, 2018
1 parent 4c5f69e commit 136fea96826530c0f73170dbe9cae463e8f08bff
Showing with 14 additions and 0 deletions.
  1. +14 −0 test/freqtable.jl
View
@@ -173,3 +173,17 @@ end
@test_throws ArgumentError freqtable()
@test_throws ArgumentError freqtable(DataFrame())
# Integer dimension
using NamedArrays
df = DataFrame(A = 101:103, B = ["x","y","y"]);
intft = freqtable(df, :A, :B)
@test names(intft) == [[101,102,103],["x","y"]]
@test intft == [1 0;
0 1;
0 1]
@test_throws BoundsError intft[101,"x"]
@test intft[Name(101),"x"] == 1

0 comments on commit 136fea9

Please sign in to comment.