GY-63_MS5611/libraries/HT16K33/test/unit_test_001.cpp
2021-12-19 15:24:23 +01:00

65 lines
1.3 KiB
C++

//
// FILE: unit_test_001.cpp
// AUTHOR: Rob Tillaart
// DATE: 2020-12-28
// PURPOSE: unit tests for the HT16K33
// https://github.com/RobTillaart/HT16K33
// https://github.com/Arduino-CI/arduino_ci/blob/master/REFERENCE.md
//
// supported assertions
// https://github.com/Arduino-CI/arduino_ci/blob/master/cpp/unittest/Assertion.h#L33-L42
// ----------------------------
// assertEqual(expected, actual)
// assertNotEqual(expected, actual)
// assertLess(expected, actual)
// assertMore(expected, actual)
// assertLessOrEqual(expected, actual)
// assertMoreOrEqual(expected, actual)
// assertTrue(actual)
// assertFalse(actual)
// assertNull(actual)
// assertNotNull(actual)
#include <ArduinoUnitTests.h>
#include "Arduino.h"
#include "HT16K33.h"
unittest_setup()
{
fprintf(stderr, "HT16K33_LIB_VERSION: %s\n", (char *) HT16K33_LIB_VERSION);
}
unittest_teardown()
{
}
/*
unittest(test_new_operator)
{
assertEqualINF(exp(800));
assertEqualINF(0.0/0.0);
assertEqualINF(42);
assertEqualNAN(INFINITY - INFINITY);
assertEqualNAN(0.0/0.0);
assertEqualNAN(42);
}
*/
unittest(test_constructor)
{
HT16K33 seg(0x70);
fprintf(stderr, "None of the functions return anything...\n");
assertEqual(1, 1);
}
unittest_main()
// --------