@@ -101,7 +101,7 @@ test_that("%% and %/% with mixed modes promote", {
101101test_that(" ^ always returns double; integer exponent stays exact" , {
102102 fn <- function (x ) {
103103 declare(type(x = integer(1 )))
104- x ^ - 1L
104+ x ^ -1L
105105 }
106106 # locks the `** (...)` parenthesization and the double result mode:
107107 # integer ** used to return integer (R: 0.5, bug: 0) through
@@ -111,21 +111,21 @@ test_that("^ always returns double; integer exponent stays exact", {
111111
112112 fn2 <- function (x ) {
113113 declare(type(x = integer(n )))
114- x ^ 2L
114+ x ^ 2L
115115 }
116116 expect_quick_equal(fn2 , list (- 3 : 3 ))
117117
118118 fn3 <- function (x ) {
119119 declare(type(x = double(1 )))
120- x ^ 2L
120+ x ^ 2L
121121 }
122122 # negative base with whole-number exponent is defined in R (and in
123123 # Fortran's real ** int, unlike real ** real)
124124 expect_quick_equal(fn3 , list (- 2 ), list (2.5 ))
125125
126126 fn4 <- function (x ) {
127127 declare(type(x = double(1 )))
128- x ^ 2.5
128+ x ^ 2.5
129129 }
130130 expect_quick_equal(fn4 , list (2 ))
131131})
@@ -155,7 +155,7 @@ test_that("logical operands participate in arithmetic as integers", {
155155
156156 fn_pow <- function (a , b ) {
157157 declare(type(a = logical (1 )), type(b = logical (1 )))
158- a ^ b
158+ a ^ b
159159 }
160160 # R: TRUE ^ TRUE is 1 (double)
161161 expect_quick_equal(fn_pow , list (TRUE , TRUE ), list (FALSE , TRUE ))
0 commit comments