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() diff --git a/spec/testsomething_unittests_spec.rb b/spec/testsomething_unittests_spec.rb index c882399f..1f7bce72 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 @@ -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