GY-63_MS5611/libraries/DS1821/test/unit_test_001.cpp_avr_specific
2021-12-17 14:11:19 +01:00

55 lines
1.0 KiB
Plaintext

//
// FILE: unit_test_001.cpp
// AUTHOR: Rob Tillaart
// DATE: 2020-12-20
// PURPOSE: unit tests for the DS1821
// https://github.com/RobTillaart/DS1821
// 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 "DS1821.h"
unittest_setup()
{
fprintf(stderr, "DS1821_H_LIB_VERSION: %s\n", (char *) DS1821_H_LIB_VERSION);
}
unittest_teardown()
{
}
unittest(test_constructor)
{
OneWire ow(10);
DS1821 ds(&ow);
int n = ds.requestTemperature();
assertEqual(1, 1);
}
unittest_main()
// --------