Skip to content

Commit 1dc0486

Browse files
author
Qiang Kou
committed
unit test
1 parent 919ac76 commit 1dc0486

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inst/unitTests/runit.String.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ if (.runThisTest) {
2424
.setUp <- Rcpp:::unitTestSetup("String.cpp")
2525

2626
test.replace_all <- function(){
27-
checkEquals( String_replace_all("foobar", "o", "*"), "f**bar")
27+
checkEquals( String_replace_all("abcdbacdab", "ab", "AB"), "ABcdbacdAB")
2828
}
2929
test.replace_first <- function(){
30-
checkEquals( String_replace_first("foobar", "o", "*"), "f*obar")
30+
checkEquals( String_replace_first("abcdbacdab", "ab", "AB"), "ABcdbacdab")
3131
}
3232
test.replace_last <- function(){
33-
checkEquals( String_replace_last("foobar", "o", "*"), "fo*bar")
33+
checkEquals( String_replace_last("abcdbacdab", "ab", "AB"), "abcdbacdAB")
3434
}
3535

3636
test.String.sapply <- function(){

0 commit comments

Comments
 (0)