Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit62018cc

Browse files
author
Florian Plaza Oñate
committed
Enable unit tests with negative indices
1 parent2eab5d8 commit62018cc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎inst/unitTests/runit.Matrix.R‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ if (.runThisTest) {
178178
checkEquals(mat_access_with_bounds_checking(m,3,2),12)
179179
checkException(mat_access_with_bounds_checking(m,4,2) ,msg="index out of bounds not detected" )
180180
checkException(mat_access_with_bounds_checking(m,3,3) ,msg="index out of bounds not detected" )
181-
#checkException(mat_access_with_bounds_checking(m, 3, -1) , msg = "index out of bounds not detected" )
182-
#checkException(mat_access_with_bounds_checking(m, -1, 2) , msg = "index out of bounds not detected" )
183-
#checkException(mat_access_with_bounds_checking(m, -1, -1) , msg = "index out of bounds not detected" )
181+
checkException(mat_access_with_bounds_checking(m,3,-1) ,msg="index out of bounds not detected" )
182+
checkException(mat_access_with_bounds_checking(m,-1,2) ,msg="index out of bounds not detected" )
183+
checkException(mat_access_with_bounds_checking(m,-1,-1) ,msg="index out of bounds not detected" )
184184
}
185185

186186
}

‎inst/unitTests/runit.Vector.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ if (.runThisTest) {
688688
x<- seq(1L,5L,by=1L)
689689
checkEquals(vec_access_with_bounds_checking(x,3),4)
690690
checkException(vec_access_with_bounds_checking(x,5) ,msg="index out of bounds not detected" )
691-
#checkException(vec_access_with_bounds_checking(x, -1) , msg = "index out of bounds not detected" )
691+
checkException(vec_access_with_bounds_checking(x,-1) ,msg="index out of bounds not detected" )
692692
}
693693
}
694694

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp