Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions SampleProjects/TestSomething/test/foo.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <ArduinoUnitTests.h>
#include <Arduino.h>

unittest(foo)
{
foo;
}

unittest_main()
7 changes: 2 additions & 5 deletions spec/testsomething_unittests_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down