diff --git a/pkgs/test/macos-sierra-shared/default.nix b/pkgs/test/macos-sierra-shared/default.nix index 2d52a02affa0..e96fdb34c05f 100644 --- a/pkgs/test/macos-sierra-shared/default.nix +++ b/pkgs/test/macos-sierra-shared/default.nix @@ -30,7 +30,8 @@ let src=$PWD cat << 'EOF' > main.cxx - #include + #include + #include ${toString (lib.genList (i: "extern \"C\" unsigned int asdf_${toString i}(void); ") count)} @@ -39,11 +40,15 @@ let }; int main(int argc, char **argv) { + bool ret; unsigned int i = 0; for (auto f : funs) { - assert(f() == i++); + if (f() != i++) { + std::cerr << "Failed to get expected response from function #" << i << std::endl; + return EXIT_FAILURE; + } } - return 0; + return EXIT_SUCCESS; } EOF '';