Skip to content

Commit 583c465

Browse files
committed
Format with air
1 parent b3f5894 commit 583c465

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/testthat/test-example-convolve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test_that("convolve", {
1111
ab <- double(length(a) + length(b) - 1)
1212
for (i in seq_along(a)) {
1313
for (j in seq_along(b)) {
14-
ab[i + j - 1] = ab[i + j - 1] + a[i] * b[j]
14+
ab[i + j - 1] <- ab[i + j - 1] + a[i] * b[j]
1515
}
1616
}
1717
ab

tests/testthat/test-loops.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test_that("break/for", {
3939
fn <- function(x) {
4040
declare(type(x = integer(1)))
4141
for (i in 1:10) {
42-
x = x + 1L
42+
x <- x + 1L
4343
if (x >= 5L) {
4444
break
4545
}
@@ -55,7 +55,7 @@ test_that("while", {
5555
fn <- function(x) {
5656
declare(type(x = integer(1)))
5757
while (x < 5L) {
58-
x = x + 1L
58+
x <- x + 1L
5959
}
6060
x
6161
}

tests/testthat/test-size-constraint.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ skip_on_cran()
55
test_that("size constraint", {
66
fn <- function(a, b) {
77
declare(type(a = double(n)), type(b = double(n + 1)))
8-
a = sum(b)
8+
a <- sum(b)
99
a
1010
}
1111

0 commit comments

Comments
 (0)