-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,8 @@ Maintainer: Konrad Siek <[email protected]> | |
License: GPL-2 | GPL-3 | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Depends: ufos | ||
LinkingTo: ufos | ||
Depends: ufos, viewports | ||
LinkingTo: ufos, viewports | ||
NeedsCompilation: yes | ||
Suggests: | ||
knitr, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
library(testthat) | ||
library(ufovectors) | ||
|
||
test_check("ufovectors") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
context("Vector operations on file-backed integer vectors") | ||
|
||
dir <- "../../data" | ||
|
||
test_that("sum 1K ones", { | ||
path <- paste(dir, "1K_ones_int.bin", sep="/") | ||
expect_equal(sum(ufo_integer_bin(path) + 1), 2 * 1000) | ||
}) | ||
|
||
test_that("sum 1M ones", { | ||
path <- paste(dir, "1M_ones_int.bin", sep="/") | ||
expect_equal(sum(ufo_integer_bin(path) + 1), 2 * 1000000) | ||
}) | ||
|
||
test_that("sum 1G ones", { | ||
path <- paste(dir, "1G_ones_int.bin", sep="/") | ||
expect_equal(sum(ufo_integer_bin(path) + 1), 2 * 1000000000) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
context("Sum on file-backed integer vectors") | ||
|
||
dir <- "../../data" | ||
|
||
test_that("sum 1K ones", { | ||
path <- paste(dir, "1K_ones_int.bin", sep="/") | ||
expect_equal(sum(ufo_integer_bin(path)), 1000) | ||
}) | ||
|
||
test_that("sum 1M ones", { | ||
path <- paste(dir, "1M_ones_int.bin", sep="/") | ||
expect_equal(sum(ufo_integer_bin(path)), 1000000) | ||
}) | ||
|
||
test_that("sum 1G ones", { | ||
path <- paste(dir, "1G_ones_int.bin", sep="/") | ||
expect_equal(sum(ufo_integer_bin(path)), 1000000000) | ||
}) |