From 6f09afcf96ab3eff24677d432c811f058e4139d9 Mon Sep 17 00:00:00 2001 From: Magnus Date: Fri, 2 Dec 2022 11:40:40 +0100 Subject: [PATCH] Added gyro tests --- src/tests/tests_gyro.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/tests/tests_gyro.cpp b/src/tests/tests_gyro.cpp index 27a6a38..4c15699 100644 --- a/src/tests/tests_gyro.cpp +++ b/src/tests/tests_gyro.cpp @@ -21,24 +21,23 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include #include test(gyro_connectGyro) { - Serial.println("Not implemented yet (gyro_connectGyro)"); + myGyro.setup(); + assertEqual(myGyro.isConnected(), true); } test(gyro_readGyro) { - Serial.println("Not implemented yet (gyro_readGyro)"); -} - -test(gyro_calibrate) { - Serial.println("Not implemented yet (gyro_calibrate)"); + myGyro.setup(); + assertEqual(myGyro.read(), true); } test(gyro_readGyroTemp) { - Serial.println("Not implemented yet (gyro_readGyroTemp)"); + myGyro.setup(); + assertNotEqual(myGyro.getInitialSensorTempC(), -273.0); + assertNotEqual(myGyro.getSensorTempC(), -273.0); } // EOF \ No newline at end of file