From bef8f3d774fb5a7ea4c05d0312c82c5e9ee66e68 Mon Sep 17 00:00:00 2001 From: Travers Date: Mon, 27 Nov 2023 14:38:31 -0800 Subject: [PATCH] update tests for altrep serializations --- ChangeLog | 3 ++- DESCRIPTION | 2 +- tests/correctness_testing.R | 4 ---- tests/qattributes_testing.R | 5 ++++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index de5bb70..cb627f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ -Version 0.25.6 (2023-3-26) +Version 0.25.6 (2023-11-27) + * Fix tests to account for ALTREP serialization * Add filenames to error messages (https://github.com/traversc/qs/issues/75) * Fix unit tests for big endian system (https://github.com/traversc/qs/issues/77) * Check for GCC and add `-latomic` flag which is sometimes required (https://github.com/traversc/qs/issues/76) diff --git a/DESCRIPTION b/DESCRIPTION index c008e93..a7192e2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: qs Type: Package Title: Quick Serialization of R Objects Version: 0.25.6 -Date: 2023-3-26 +Date: 2023-11-27 Authors@R: c( person("Travers", "Ching", email = "traversc@gmail.com", role = c("aut", "cre", "cph")), person("Yann", "Collet", role = c("ctb", "cph"), comment = "Yann Collet is the author of the bundled zstd, lz4 and xxHash code"), diff --git a/tests/correctness_testing.R b/tests/correctness_testing.R index 421bb48..a8a2c40 100644 --- a/tests/correctness_testing.R +++ b/tests/correctness_testing.R @@ -167,10 +167,6 @@ printCarriage <- function(x) { cat(x, "\r") } -serialize_identical <- function(x1, x2) { - identical(serialize(x1, NULL), serialize(x2, NULL)) -} - ################################################################################################ qsave_rand <- function(x, file) { diff --git a/tests/qattributes_testing.R b/tests/qattributes_testing.R index f8de16b..e610811 100644 --- a/tests/qattributes_testing.R +++ b/tests/qattributes_testing.R @@ -182,7 +182,10 @@ qsave_rand <- function(x, file) { } qattributes_rand <- function(file) { - ar <- sample(c(T,F),1) + # ar <- sample(c(T,F),1) + # don't use altrep to avoid serialization differences + # attributes_serialize_identical won't pass with ALTREP + ar <- FALSE nt <- sample(5,1) qattributes(file, use_alt_rep = ar, nthreads = nt, strict = T) }