From f4f6d0cb40f29e4032f618154715478e9ee2ff69 Mon Sep 17 00:00:00 2001 From: James Foster Date: Sun, 4 Apr 2021 18:22:48 -0700 Subject: [PATCH 1/4] Demo lack of error report. --- SampleProjects/TestSomething/test/foo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 SampleProjects/TestSomething/test/foo.cpp diff --git a/SampleProjects/TestSomething/test/foo.cpp b/SampleProjects/TestSomething/test/foo.cpp new file mode 100644 index 00000000..1907be0d --- /dev/null +++ b/SampleProjects/TestSomething/test/foo.cpp @@ -0,0 +1,8 @@ +#include + +unittest(foo) +{ + foo; +} + +unittest_main() From e2095d78c1d63ada87f4727d908adea1b9c53071 Mon Sep 17 00:00:00 2001 From: James Foster Date: Sun, 4 Apr 2021 18:32:51 -0700 Subject: [PATCH 2/4] Now the error should show. --- SampleProjects/TestSomething/test/foo.cpp | 8 -------- spec/testsomething_unittests_spec.rb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 SampleProjects/TestSomething/test/foo.cpp diff --git a/SampleProjects/TestSomething/test/foo.cpp b/SampleProjects/TestSomething/test/foo.cpp deleted file mode 100644 index 1907be0d..00000000 --- a/SampleProjects/TestSomething/test/foo.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -unittest(foo) -{ - foo; -} - -unittest_main() diff --git a/spec/testsomething_unittests_spec.rb b/spec/testsomething_unittests_spec.rb index c882399f..bf3f9f62 100644 --- a/spec/testsomething_unittests_spec.rb +++ b/spec/testsomething_unittests_spec.rb @@ -72,7 +72,7 @@ context "file #{tfn} (using #{compiler})" do around(:example) { |example| fld.in_pristine_fake_libraries_dir(example) } - before(:all) do + before(:each) do @cpp_library = backend.install_local_library(cpp_lib_path) @exe = @cpp_library.build_for_test_with_configuration(path, [], compiler, config.gcc_config("uno")) end From 61c5c8728875c6766a274f3938d42c90fdf9ca00 Mon Sep 17 00:00:00 2001 From: James Foster Date: Sun, 4 Apr 2021 18:38:30 -0700 Subject: [PATCH 3/4] Restore missing test file. --- SampleProjects/TestSomething/test/foo.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 SampleProjects/TestSomething/test/foo.cpp diff --git a/SampleProjects/TestSomething/test/foo.cpp b/SampleProjects/TestSomething/test/foo.cpp new file mode 100644 index 00000000..ebbedf13 --- /dev/null +++ b/SampleProjects/TestSomething/test/foo.cpp @@ -0,0 +1,9 @@ +#include +#include + +unittest(foo) +{ + foo; +} + +unittest_main() From 606855d366a8adf0e0ba7ea9ea68b6ce3224048a Mon Sep 17 00:00:00 2001 From: James Foster Date: Sun, 4 Apr 2021 19:51:36 -0700 Subject: [PATCH 4/4] Try proposed fix. --- spec/testsomething_unittests_spec.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/spec/testsomething_unittests_spec.rb b/spec/testsomething_unittests_spec.rb index bf3f9f62..1f7bce72 100644 --- a/spec/testsomething_unittests_spec.rb +++ b/spec/testsomething_unittests_spec.rb @@ -88,11 +88,8 @@ end end - it "#{tfn} builds successfully" do + it "#{tfn} builds successfully and passes tests" do expect(@exe).not_to be nil - end - it "#{tfn} passes tests" do - skip "Can't run the test program because it failed to build" if @exe.nil? expect(@cpp_library.run_test_file(@exe)).to_not be_falsey end end