1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

device tests: some of them can be run on host (#6912)

* device tests: mock scripts + rename some tests to enable mock-testing them

* move symbol
This commit is contained in:
david gauchard
2019-12-16 19:20:07 +01:00
committed by GitHub
parent d1237fd016
commit d40dbb4584
16 changed files with 41 additions and 6 deletions

View File

@ -0,0 +1,51 @@
#include <BSTest.h>
BS_ENV_DECLARE();
void setup()
{
Serial.begin(115200);
BS_RUN(Serial);
}
bool pretest()
{
return true;
}
TEST_CASE("this test runs successfully", "[bs]")
{
CHECK(1 + 1 == 2);
REQUIRE(2 * 2 == 4);
}
TEST_CASE("another test which successfully fails", "[bs][fail]")
{
CHECK(true);
CHECK(false);
CHECK(true);
CHECK(false);
}
TEST_CASE("another test which successfully fails and crashes", "[bs][fail]")
{
CHECK(true);
REQUIRE(false);
}
TEST_CASE("third test which should be skipped", "[.]")
{
FAIL();
}
TEST_CASE("this test also runs successfully", "[bs]")
{
}
void loop()
{
}