Permalink
Browse files

A few more tests. Need lots more...

  • Loading branch information...
1 parent 4a9e1f9 commit b5dd71f619b6fc6a638762f828a42a48ee492be5 @bwlewis committed Sep 11, 2013
Showing with 26 additions and 0 deletions.
  1. +1 −0 test/runTest.R
  2. +25 −0 test/setTest.R
View
@@ -2,4 +2,5 @@ require(rredis)
require(RUnit)
runTestFile('basicTest.R')
runTestFile('zsetTest.R')
+runTestFile('setTest.R')
runTestFile('endTest.R')
View
@@ -0,0 +1,25 @@
+
+test01_connect <- function()
+{
+ redisConnect()
+ redisFlushDB()
+}
+
+test02_redisSAdd_Inter <- function()
+{
+ redisSAdd("A",1)
+ redisSAdd("A",2)
+ redisSAdd("A",3)
+ redisSAdd("B",2)
+ checkEquals(2, redisSInter("A","B")[[1]])
+}
+
+test03_redisSUnion <- function()
+{
+ checkEquals(TRUE, all(list(1,2,3) %in% redisSUnion("A","B")))
+}
+
+test04_redisSCard <- function()
+{
+ checkEquals(3, redisSCard("A"))
+}

0 comments on commit b5dd71f

Please sign in to comment.