Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip two tests on arm64, add macOS to matrix (fixes #128) #129

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
include:
#- {os: macOS-latest}
- {os: macOS-latest}
- {os: ubuntu-latest}

runs-on: ${{ matrix.os }}
Expand Down
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2024-06-20 Dirk Eddelbuettel <edd@debian.org>

* inst/tinytest/test_nanotime.R: Condition two tests to not run on arm64

* .github/workflows/ci.yaml (jobs): Add macOS-latest back to matrix

2024-06-19 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Release 0.3.8
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: nanotime
Type: Package
Title: Nanosecond-Resolution Time Support for R
Version: 0.3.8
Date: 2024-06-19
Version: 0.3.8.1
Date: 2024-06-20
Author: Dirk Eddelbuettel and Leonardo Silvestri
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Description: Full 64-bit resolution date and time functionality with
Expand Down
5 changes: 3 additions & 2 deletions inst/tinytest/test_nanotime.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ options(digits=7) # needed for error message of 0.3333333
expect_equal_numeric <- function(x,y,...) expect_equal(as.numeric(x), as.numeric(y), ...)

isSolaris <- Sys.info()[["sysname"]] == "SunOS"
isArm64 <- Sys.info()[["machine"]] == "arm64"

## nanotime constructors
##test_nanotime_generic <- function() {
Expand Down Expand Up @@ -140,11 +141,11 @@ expect_identical(as.nanotime(p), nanotime("1970-01-01T00:00:00.000000000-05:00")
## This one should break if multiplying the double by 1E9 directly
## without considering the integer and fraction parts separately.
p <- as.POSIXct(as.numeric('0x1.91f18e4d0065p+30'), origin = '1970-01-01')
expect_identical(p, as.POSIXct(as.nanotime(p)))
if (!isArm64) expect_identical(p, as.POSIXct(as.nanotime(p)))

## This one is negative, making sure that negative doubles are also consistent.
p <- as.POSIXct(as.numeric('-0x1.c6e8c4d077ae4p+30'), origin = '1970-01-01')
expect_identical(p, as.POSIXct(as.nanotime(p)))
if (!isArm64) expect_identical(p, as.POSIXct(as.nanotime(p)))

## with the 'accurate' parameter set to FALSE, the round trip should not be equal:
p <- as.POSIXct(as.numeric('0x1.91f18e4d0065p+30'), origin = '1970-01-01')
Expand Down