Running ‘testthat.R’ [35s/71s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(cpp11)
  > 
  > test_check("cpp11")
  specified C++11
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  /Volumes/Temp/tmp/RtmpTEz8KO/code_3cb241f98129.cpp:1:3: warning: unknown attribute 'register' ignored [-Wunknown-attributes]
  [[cpp11::register]] int foo() { return 0; }
    ^~~~~~~~~~~~~~~
  1 warning generated.
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb22beeaa77/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb22beeaa77/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-knitr-22.R
  specified C++11
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/code_3cb26723693f.cpp:2:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/integers.hpp:8:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb26f481bf4/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/code_3cb26723693f.o] Error 1
  make: *** Waiting for unfinished jobs....
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb26f481bf4/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-source-17.R
  specified C++11
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  /Volumes/Temp/tmp/RtmpTEz8KO/file3cb27983131a.cpp:1:3: warning: unknown attribute 'register' ignored [-Wunknown-attributes]
  [[cpp11::register]]
    ^~~~~~~~~~~~~~~
  1 warning generated.
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb2c5b4e49/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb2c5b4e49/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-source-34.R
  specified C++11
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  /Volumes/Temp/tmp/RtmpTEz8KO/cpp11_2.cpp:1:3: warning: unknown attribute 'register' ignored [-Wunknown-attributes]
  [[cpp11::register]]
    ^~~~~~~~~~~~~~~
  1 warning generated.
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb244712ce1/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb244712ce1/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-source-51.R
  specified C++14
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  /Volumes/Temp/tmp/RtmpTEz8KO/file3cb21b7402ac.cpp:3:7: warning: unknown attribute 'register' ignored [-Wunknown-attributes]
      [[cpp11::register]]
        ^~~~~~~~~~~~~~~
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb25d5b7848/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 warning generated.
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb25d5b7848/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-source-83.R
  specified C++11
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/code_3cb2460f8841.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb2529f0537/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 error generated.
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/code_3cb2460f8841.o] Error 1
  make: *** Waiting for unfinished jobs....
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb2529f0537/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-source-131.R
  specified C++11
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/code_3cb2b5f22ea.cpp:1:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb276e8464b/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/code_3cb2b5f22ea.o] Error 1
  make: *** Waiting for unfinished jobs....
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb276e8464b/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-source-149.R
  specified C++11
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/tests/testthat/single.cpp:1:3: warning: unknown attribute 'register' ignored [-Wunknown-attributes]
  [[cpp11::register]] int foo() { return 1; }
    ^~~~~~~~~~~~~~~
  1 warning generated.
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb277555d37/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb277555d37/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-source-215.R
  specified C++11
  using C++ compiler: ‘Apple clang version 14.0.3 (clang-1403.0.22.14.1)’
  using SDK: ‘NA’
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/code_3cb2401fe5e2.cpp:2:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/function.hpp:8:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  /Volumes/Temp/tmp/RtmpTEz8KO/code_3cb2401fe5e2.cpp:6:12: warning: unused variable 'pkg' [-Wunused-variable]
        auto pkg = cpp11::package("definitely_not_a_package");
             ^
  In file included from /Volumes/Temp/tmp/RtmpTEz8KO/file3cb21c4ded72/src/cpp11.cpp:1:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/declarations.hpp:13:
  In file included from /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11.hpp:3:
  /Volumes/Builds/packages/big-sur-x86_64/results/4.6/cpp11.Rcheck/cpp11/include/cpp11/R.hpp:128:10: error: use of undeclared identifier 'R_getRegisteredNamespace'
    return R_getRegisteredNamespace(name);
           ^
  1 warning and 1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/code_3cb2401fe5e2.o] Error 1
  make: *** Waiting for unfinished jobs....
  1 error generated.
  make: *** [/Volumes/Temp/tmp/RtmpTEz8KO/file3cb21c4ded72/src/cpp11.o] Error 1
  Warning message:
  In system2("xcrun", "--show-sdk-version", TRUE, TRUE) :
    running command ''xcrun' --show-sdk-version 2>&1' had status 1
  Saving _problems/test-source-242.R
  [ FAIL 9 | WARN 0 | SKIP 5 | PASS 95 ]
  
  ══ Skipped tests (5) ═══════════════════════════════════════════════════════════
  • On CRAN (5): 'test-register.R:52:3', 'test-register.R:66:3',
    'test-register.R:508:3', 'test-register.R:536:3', 'test-source.R:221:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-knitr.R:19:5'): eng_cpp11 / works when code is evaluated ───────
  Error: Compilation failed.
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(eng_cpp11(opts), code) at test-knitr.R:19:5
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─cpp11:::eng_cpp11(opts)
   5.   └─cpp11::cpp_source(...)
  ── Error ('test-source.R:3:3'): cpp_source works with the `code` parameter ─────
  Error: Compilation failed.
  Backtrace:
      ▆
   1. └─cpp11::cpp_source(...) at test-source.R:3:3
  ── Error ('test-source.R:34:3'): cpp_source works with the `file` parameter ────
  Error: Compilation failed.
  Backtrace:
      ▆
   1. └─cpp11::cpp_source(tf, clean = TRUE, quiet = TRUE) at test-source.R:34:3
  ── Error ('test-source.R:51:3'): cpp_source works with files called `cpp11.cpp` ──
  Error: Compilation failed.
  Backtrace:
      ▆
   1. └─cpp11::cpp_source(tf, clean = TRUE, quiet = TRUE) at test-source.R:51:3
  ── Error ('test-source.R:83:3'): cpp_source lets you set the C++ standard ──────
  Error: Compilation failed.
  Backtrace:
      ▆
   1. └─cpp11::cpp_source(tf, clean = TRUE, quiet = TRUE, cxx_std = "CXX14") at test-source.R:83:3
  ── Failure ('test-source.R:117:3'): check_valid_attributes does not return an error if all registers are correct ──
  Expected `cpp11::cpp_source(clean = TRUE, code = "#include <cpp11.hpp>\n  using namespace cpp11::literals;\n  [[cpp11::register]]\n  cpp11::list fn() {\n    cpp11::writable::list x;\n    x.push_back({\"foo\"_nm = 1});\n    return x;\n  }\n [[cpp11::register]]\n  cpp11::list fn2() {\n    cpp11::writable::list x;\n    x.push_back({\"foo\"_nm = 1});\n    return x;\n  }")` not to throw any errors.
  Actually got a <simpleError> with message:
    Compilation failed.
  Backtrace:
      ▆
   1. ├─cpp11:::expect_error_free(cpp11::cpp_source(clean = TRUE, code = "#include <cpp11.hpp>\n  using namespace cpp11::literals;\n  [[cpp11::register]]\n  cpp11::list fn() {\n    cpp11::writable::list x;\n    x.push_back({\"foo\"_nm = 1});\n    return x;\n  }\n [[cpp11::register]]\n  cpp11::list fn2() {\n    cpp11::writable::list x;\n    x.push_back({\"foo\"_nm = 1});\n    return x;\n  }")) at test-source.R:117:3
   2. │ └─testthat::expect_error(..., regexp = regexp) at ./helper.R:33:3
   3. │   └─testthat:::expect_condition_matching_(...)
   4. │     └─testthat:::quasi_capture(...)
   5. │       ├─testthat (local) .capture(...)
   6. │       │ └─base::withCallingHandlers(...)
   7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   8. └─cpp11::cpp_source(clean = TRUE, code = "#include <cpp11.hpp>\n  using namespace cpp11::literals;\n  [[cpp11::register]]\n  cpp11::list fn() {\n    cpp11::writable::list x;\n    x.push_back({\"foo\"_nm = 1});\n    return x;\n  }\n [[cpp11::register]]\n  cpp11::list fn2() {\n    cpp11::writable::list x;\n    x.push_back({\"foo\"_nm = 1});\n    return x;\n  }")
  ── Failure ('test-source.R:132:3'): check_valid_attributes does not return an error if all registers are correct ──
  Expected `cpp11::cpp_source(clean = TRUE, code = "#include <cpp11/R.hpp>\n              #include <RProgress.h>\n\n              [[cpp11::linking_to(\"progress\")]]\n\n              [[cpp11::register]] void show_progress() {\n                RProgress::RProgress pb(\"Processing [:bar] ETA: :eta\");\n\n                pb.tick(0);\n                for (int i = 0; i < 100; i++) {\n                  usleep(2.0 / 100 * 1000000);\n                  pb.tick();\n                }\n              }\n              ")` not to throw any errors.
  Actually got a <simpleError> with message:
    Compilation failed.
  Backtrace:
      ▆
   1. ├─cpp11:::expect_error_free(cpp11::cpp_source(clean = TRUE, code = "#include <cpp11/R.hpp>\n              #include <RProgress.h>\n\n              [[cpp11::linking_to(\"progress\")]]\n\n              [[cpp11::register]] void show_progress() {\n                RProgress::RProgress pb(\"Processing [:bar] ETA: :eta\");\n\n                pb.tick(0);\n                for (int i = 0; i < 100; i++) {\n                  usleep(2.0 / 100 * 1000000);\n                  pb.tick();\n                }\n              }\n              ")) at test-source.R:132:3
   2. │ └─testthat::expect_error(..., regexp = regexp) at ./helper.R:33:3
   3. │   └─testthat:::expect_condition_matching_(...)
   4. │     └─testthat:::quasi_capture(...)
   5. │       ├─testthat (local) .capture(...)
   6. │       │ └─base::withCallingHandlers(...)
   7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   8. └─cpp11::cpp_source(clean = TRUE, code = "#include <cpp11/R.hpp>\n              #include <RProgress.h>\n\n              [[cpp11::linking_to(\"progress\")]]\n\n              [[cpp11::register]] void show_progress() {\n                RProgress::RProgress pb(\"Processing [:bar] ETA: :eta\");\n\n                pb.tick(0);\n                for (int i = 0; i < 100; i++) {\n                  usleep(2.0 / 100 * 1000000);\n                  pb.tick();\n                }\n              }\n              ")
  ── Error ('test-source.R:215:3'): cpp_source(d) functions work after sourcing file more than once ──
  Error: Compilation failed.
  Backtrace:
      ▆
   1. └─cpp11::cpp_source(test_path("single.cpp"), clean = TRUE) at test-source.R:215:3
  ── Error ('test-source.R:233:3'): `cpp11::package` throws expected error on unknown packages ──
  Error: Compilation failed.
  Backtrace:
      ▆
   1. └─cpp11::cpp_source(...) at test-source.R:233:3
  
  [ FAIL 9 | WARN 0 | SKIP 5 | PASS 95 ]
  Error:
  ! Test failures.
  Execution halted