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

Device side test library and test runner

This commit is contained in:
Ivan Grokhotkov
2016-03-10 09:12:11 +03:00
committed by Ivan Grokhotkov
parent 33723a9b52
commit ab7af89002
26 changed files with 1118 additions and 206 deletions

View File

@ -0,0 +1,47 @@
#include <BSTest.h>
#include <test_config.h>
BS_ENV_DECLARE();
void setup()
{
Serial.begin(115200);
BS_RUN(Serial);
}
TEST_CASE("this test runs successfully", "[bs]")
{
CHECK(1 + 1 == 2);
REQUIRE(2 * 2 == 4);
}
TEST_CASE("another test which fails", "[bs][fail]")
{
CHECK(true);
CHECK(false);
CHECK(true);
CHECK(false);
}
TEST_CASE("another test which 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()
{
}