MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / unittest

Function unittest

libraries/PCA9685_RT/test/unit_test_001.cpp:50–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48
49
50unittest(test_constants)
51{
52 fprintf(stderr, "\nregisterss");
53 assertEqual(PCA9685_MODE1 , 0x00);
54 assertEqual(PCA9685_MODE2 , 0x01);
55 assertEqual(PCA9685_ALLCALLADR , 0x05);
56 assertEqual(PCA9685_CHANNEL_0 , 0x06);
57
58 assertEqual(PCA9685_ALL_ON_L , 0xFA);
59 assertEqual(PCA9685_ALL_ON_H , 0xFB);
60 assertEqual(PCA9685_ALL_OFF_L , 0xFC);
61 assertEqual(PCA9685_ALL_OFF_H , 0xFD);
62
63 assertEqual(PCA9685_PRE_SCALER , 0xFE);
64 assertEqual(PCA9685_TESTMODE , 0xFF);
65
66
67 fprintf(stderr, "\nerrorcodes");
68 assertEqual(PCA9685_OK , 0x00);
69 assertEqual(PCA9685_ERROR , 0xFF);
70 assertEqual(PCA9685_ERR_CHANNEL, 0xFE);
71 assertEqual(PCA9685_ERR_MODE , 0xFD);
72 assertEqual(PCA9685_ERR_I2C , 0xFC);
73}
74
75
76unittest(test_constructor)

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
isConnectedMethod · 0.45
channelCountMethod · 0.45

Tested by

no test coverage detected