Skip to content

Commit 222a4b0

Browse files
committed
Test hex floats and negative cases
1 parent 22f269d commit 222a4b0

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tests/reg-tests-1d.R

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5914,8 +5914,19 @@ stopifnot(exprs = {
59145914
identical(12e3, 1_2e3)
59155915
identical(0xa2, 0xa_2)
59165916
identical(0xaa, 0xa_a)
5917-
})
5918-
5917+
identical(0xaap1, 0xa_ap1)
5918+
})
5919+
5920+
for (s in c(
5921+
# Underscore not between digits or outside significand is invalid
5922+
'_123', '123_',
5923+
'123_L', '123L_',
5924+
'123_e1', '123e_1', '123e1_',
5925+
'0x_a', '0xa_',
5926+
'0xap_12', '0xap1_2',
5927+
# and so are multiple underscores anywhere
5928+
'1__23', '0x1__23'
5929+
)) assertErrV(str2lang(s))
59195930

59205931
## fisher.test() with "too full" table: PR#18336
59215932
d <- matrix(c(1,0,5,2,1,90

0 commit comments

Comments
 (0)