Skip to content

Commit 49d6e0e

Browse files
committed
Add tests for armadillo_version_typed()
1 parent 447c738 commit 49d6e0e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2025-10-21 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/tinytest/test_misc.R: Tests for armadillo_version_typed()
4+
15
2025-10-20 Dirk Eddelbuettel <[email protected]>
26

37
* DESCRIPTION (Version, Date): RcppArmadillo 15.2.0-0

inst/tinytest/test_misc.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/r -t
22
#
3-
# Copyright (C) 2021-2023 Dirk Eddelbuettel
3+
# Copyright (C) 2021-2025 Dirk Eddelbuettel
44
#
55
# This file is part of RcppArmadillo.
66
#
@@ -23,9 +23,14 @@ library(RcppArmadillo)
2323
arma <- armadillo_version(FALSE)
2424
expect_equal(length(arma), 3) # major minor patch
2525
expect_equal(names(arma), c("major","minor","patch"))
26+
av <- as.package_version(paste(arma, collapse="."))
2627
arma <- armadillo_version(TRUE)
2728
expect_equal(class(arma), "integer")
2829
expect_equal(length(arma), 1L)
30+
pv <- armadillo_version_typed()
31+
expect_inherits(pv, "package_version")
32+
expect_inherits(pv, "numeric_version")
33+
expect_equal(pv, av)
2934

3035
## no tests as we have no (current) accessor as we prefer R RNGs
3136
expect_warning(armadillo_set_seed_random())

0 commit comments

Comments
 (0)