Running ‘testthat.R’ [36s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(RcppThread)
  > 
  > test_check("RcppThread")
  tests.cpp: In function ‘void testThreadPoolPush()’:
  tests.cpp:58:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:63:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:65:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = x.size() / 2 + 1; i < x.size(); i++)
                                      ~~^~~~~~~~~~
  tests.cpp: In function ‘void testThreadPoolPushReturn()’:
  tests.cpp:82:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:84:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:89:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:91:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = x.size() / 2 + 1; i < x.size(); i++)
                                      ~~^~~~~~~~~~
  tests.cpp: In function ‘void testThreadPoolMap()’:
  tests.cpp:115:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:117:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = x.size() / 2 + 1; i < x.size(); i++)
                                      ~~^~~~~~~~~~
  tests.cpp: In function ‘void testThreadPoolParallelFor()’:
  tests.cpp:138:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:140:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = x.size() / 2 + 1; i < x.size(); i++)
                                      ~~^~~~~~~~~~
  tests.cpp: In function ‘void testThreadPoolParallelForEach()’:
  tests.cpp:187:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:189:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = x.size() / 2 + 1; i < x.size(); i++)
                                      ~~^~~~~~~~~~
  tests.cpp: In function ‘void testThreadPoolSingleThreaded()’:
  tests.cpp:230:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:235:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:237:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = x.size() / 2 + 1; i < x.size(); i++)
                                      ~~^~~~~~~~~~
  tests.cpp: In function ‘void testParallelFor()’:
  tests.cpp:264:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:266:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = x.size() / 2 + 1; i < x.size(); i++)
                                      ~~^~~~~~~~~~
  tests.cpp: In function ‘void testParallelForEach()’:
  tests.cpp:310:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = 0; i < x.size() / 2; i++)
                       ~~^~~~~~~~~~~~~~
  tests.cpp:312:38: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<long unsigned int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
       for (int i = x.size() / 2 + 1; i < x.size(); i++)
                                      ~~^~~~~~~~~~
  In file included from /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread.h:13,
                   from tests.cpp:4:
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘void RcppThread::ThreadPool::parallelFor(ptrdiff_t, size_t, F&&, size_t) [with F = testThreadPoolParallelFor()::<lambda(size_t)>&; ptrdiff_t = long int; size_t = long unsigned int]’:
  tests.cpp:134:47:   required from here
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp:207:13: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘ptrdiff_t’ {aka ‘long int’} [-Wsign-compare]
       if (end < begin)
           ~~~~^~~~~~~
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘void RcppThread::ThreadPool::parallelFor(ptrdiff_t, size_t, F&&, size_t) [with F = testThreadPoolNestedParallelFor()::<lambda(int)>::<lambda(int)>; ptrdiff_t = long int; size_t = long unsigned int]’:
  tests.cpp:156:10:   required from here
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp:207:13: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘ptrdiff_t’ {aka ‘long int’} [-Wsign-compare]
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘void RcppThread::ThreadPool::parallelFor(ptrdiff_t, size_t, F&&, size_t) [with F = testThreadPoolNestedParallelFor()::<lambda(int)>; ptrdiff_t = long int; size_t = long unsigned int]’:
  tests.cpp:157:6:   required from here
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp:207:13: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘ptrdiff_t’ {aka ‘long int’} [-Wsign-compare]
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘void RcppThread::ThreadPool::parallelFor(ptrdiff_t, size_t, F&&, size_t) [with F = testParallelFor()::<lambda(size_t)>&; ptrdiff_t = long int; size_t = long unsigned int]’:
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/parallelFor.hpp:48:5:   required from ‘void RcppThread::parallelFor(ptrdiff_t, size_t, F&&, size_t, size_t) [with F = testParallelFor()::<lambda(size_t)>&; ptrdiff_t = long int; size_t = long unsigned int]’
  tests.cpp:260:39:   required from here
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp:207:13: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘ptrdiff_t’ {aka ‘long int’} [-Wsign-compare]
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘void RcppThread::ThreadPool::parallelFor(ptrdiff_t, size_t, F&&, size_t) [with F = testNestedParallelFor()::<lambda(int)>::<lambda(int)>&; ptrdiff_t = long int; size_t = long unsigned int]’:
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/parallelFor.hpp:48:5:   required from ‘void RcppThread::parallelFor(ptrdiff_t, size_t, F&&, size_t, size_t) [with F = testNestedParallelFor()::<lambda(int)>::<lambda(int)>; ptrdiff_t = long int; size_t = long unsigned int]’
  tests.cpp:282:13:   required from here
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp:207:13: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘ptrdiff_t’ {aka ‘long int’} [-Wsign-compare]
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp: In instantiation of ‘void RcppThread::ThreadPool::parallelFor(ptrdiff_t, size_t, F&&, size_t) [with F = testNestedParallelFor()::<lambda(int)>&; ptrdiff_t = long int; size_t = long unsigned int]’:
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/parallelFor.hpp:48:5:   required from ‘void RcppThread::parallelFor(ptrdiff_t, size_t, F&&, size_t, size_t) [with F = testNestedParallelFor()::<lambda(int)>; ptrdiff_t = long int; size_t = long unsigned int]’
  tests.cpp:283:9:   required from here
  /home/hornik/tmp/R.check/r-patched-gcc/Work/build/Packages/RcppThread/include/RcppThread/ThreadPool.hpp:207:13: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘ptrdiff_t’ {aka ‘long int’} [-Wsign-compare]
  ── 1. Error: parallelForEach works (@tests.R#45)  ──────────────────────────────
  parallelForEach gives wrong result
  1: expect_silent(testThreadPoolParallelForEach()) at testthat/tests.R:45
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: testThreadPoolParallelForEach()
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 15 SKIPPED: 0 FAILED: 1
  1. Error: parallelForEach works (@tests.R#45) 
  
  Error: testthat unit tests failed
  Execution halted