Skip to content

Commit e1ea1ed

Browse files
committed
Add tests for analogReadResolution
1 parent 169266b commit e1ea1ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/test_function.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ namespace FunctionTest
4949
Verify(Method(ArduinoFake(), analogRead).Using(4)).Once();
5050
}
5151

52+
void test_analog_read_resolution(void)
53+
{
54+
When(Method(ArduinoFake(), analogReadResolution)).AlwaysReturn();
55+
56+
analogReadResolution(12);
57+
58+
Verify(Method(ArduinoFake(), analogReadResolution).Using(12)).Once();
59+
}
60+
5261
void test_yield(void)
5362
{
5463
When(Method(ArduinoFake(), yield)).AlwaysReturn();
@@ -188,6 +197,7 @@ namespace FunctionTest
188197
RUN_TEST(FunctionTest::test_pin_mode);
189198
RUN_TEST(FunctionTest::test_digital_pin);
190199
RUN_TEST(FunctionTest::test_analog_pin);
200+
RUN_TEST(FunctionTest::test_analog_read_resolution);
191201
RUN_TEST(FunctionTest::test_delay);
192202
RUN_TEST(FunctionTest::test_detach);
193203
RUN_TEST(FunctionTest::test_attach);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy