Skip to content

Commit

Permalink
Conditonally run capabilities tests
Browse files Browse the repository at this point in the history
It seems that the toolchain on 3.6 Windows did not have these implemented yet
  • Loading branch information
DavisVaughan committed Aug 22, 2024
1 parent 3c40a3a commit efa7733
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion cpp11test/src/test-r_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@

#include <algorithm> // for max_element

context("r_vector-C++") {
#ifdef _WIN32
#include "Rversion.h"
#define CPP11_HAS_IS_UTILITIES R_VERSION >= R_Version(4, 0, 0)
#else
#define CPP11_HAS_IS_UTILITIES 1
#endif

#if CPP11_HAS_IS_UTILITIES
context("r_vector-capabilities-C++") {
test_that("read only vector capabilities") {
using cpp11::integers;

Expand Down Expand Up @@ -71,7 +79,10 @@ context("r_vector-C++") {
expect_false(std::is_move_assignable<integers::proxy>::value);
expect_false(std::is_trivially_move_assignable<integers::proxy>::value);
}
}
#endif

context("r_vector-C++") {
test_that("writable vector temporary isn't leaked (integer) (#338)") {
R_xlen_t before = cpp11::detail::store::count();

Expand Down

0 comments on commit efa7733

Please sign in to comment.