#include "ads1115/threshold.hpp"
#include <gtest/gtest.h>
#include <stdexcept>
Go to the source code of this file.
◆ TEST() [1/2]
Definition at line 12 of file threshold.cpp.
15 ASSERT_EQ(thresh.getHigh(), 32767);
16 ASSERT_EQ(thresh.getLow(), -32768);
19 ASSERT_EQ(thresh.getHigh(), 16);
20 ASSERT_EQ(thresh.getLow(), -16);
23 ASSERT_EQ(thresh.getHigh(), -16);
24 ASSERT_EQ(thresh.getLow(), 16);
27 ASSERT_EQ(thresh.getHigh(), 16);
28 ASSERT_EQ(thresh.getLow(), 15);
30 ASSERT_THROW(
Threshold(16, 15), std::runtime_error);
◆ TEST() [2/2]
Definition at line 33 of file threshold.cpp.
38 ASSERT_EQ(thresh.getHigh(), 16);
39 ASSERT_EQ(thresh.getLow(), -16);
42 ASSERT_EQ(thresh.getHigh(), -16);
43 ASSERT_EQ(thresh.getLow(), 16);
46 ASSERT_EQ(thresh.getHigh(), 16);
47 ASSERT_EQ(thresh.getLow(), 15);
49 ASSERT_THROW(thresh.set(16, 15), std::runtime_error);
References ADS1115::Threshold::set().