move sensor_builder tests into native

This commit is contained in:
Nicu Hodos 2023-01-22 16:44:01 +01:00
parent 624f26c751
commit 37fc2ab103
5 changed files with 23 additions and 7 deletions

View File

@ -32,7 +32,7 @@ check_severity = medium, high
[env:native]
platform = native
test_filter = test_native
test_filter = native/*
lib_extra_dirs =
../libraries
lib_deps =
@ -59,4 +59,4 @@ test_testing_command =
-f
16000000L
${platformio.build_dir}/${this.__env__}/firmware.elf
test_filter = test_embedded
test_filter = embedded/*

View File

@ -10,7 +10,7 @@
#define RECEIVE_PIN 2
RCSwitch mySwitch = RCSwitch();
RCSwitch mySwitch;
SerialReader<200> serialReader;
void setup() {

View File

@ -0,0 +1,18 @@
#include <Arduino.h>
#include <unity.h>
void setUp(void) {
// set stuff up here
}
void tearDown(void) {
// clean stuff up here
}
void setup() {
UNITY_BEGIN();
UNITY_END();
}
void loop() {
}

View File

@ -1,4 +1,3 @@
#include <Arduino.h>
#include <unity.h>
#include "TinyComponent.h"
@ -98,7 +97,7 @@ void test_oil_sensor_with_voltage(void) {
TEST_ASSERT_EQUAL(2.847, diagnostic["voltage"]);
}
void setup() {
int main(int argc, char **argv) {
UNITY_BEGIN();
RUN_TEST(test_unknown_sensor_type);
RUN_TEST(test_max_temp);
@ -110,7 +109,6 @@ void setup() {
RUN_TEST(test_oil_sensor);
RUN_TEST(test_oil_sensor_with_voltage);
UNITY_END();
}
void loop() {
return 0;
}