Files
anvil/templates/weather/test/test_unit.cpp.tmpl
2026-02-21 21:33:27 -06:00

31 lines
747 B
Cheetah

/*
* test_unit.cpp -- Your unit tests go here.
*
* This file is YOURS. Anvil will never overwrite it.
* The weather station example tests are in test_weather.cpp.
*
* Unit tests use MockHal and Tmp36Mock to verify exact behavior
* without real hardware. See test_weather.cpp for examples.
*/
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "hal.h"
#include "mock_hal.h"
#include "tmp36_mock.h"
#include "{{PROJECT_NAME}}_app.h"
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::Return;
// Example: add your own tests below
// TEST(MyTests, DescribeWhatItTests) {
// ::testing::NiceMock<MockHal> mock;
// Tmp36Mock sensor;
// sensor.setTemperature(25.0f);
//
// // ... your test logic ...
// }