Index: unittests/tst_canbus.cpp =================================================================== diff -u -rb798668f16ad0967ab97e96f5f9a2cdd821e899f -r44a85c96ab55e424866ec4cca0270aa218355f82 --- unittests/tst_canbus.cpp (.../tst_canbus.cpp) (revision b798668f16ad0967ab97e96f5f9a2cdd821e899f) +++ unittests/tst_canbus.cpp (.../tst_canbus.cpp) (revision 44a85c96ab55e424866ec4cca0270aa218355f82) @@ -1,15 +1,16 @@ /*! - * + * * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. * \copyright - * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, - * IN PART OR IN WHOLE, - * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. - * - * \file tst_canbus.cpp - * \date 11/21/2019 - * \author Behrouz NematiPour - * + * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN + * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. + * + * \file tst_canbus.cpp + * \author (last) Behrouz NemaiPour + * \date (last) 23-Jun-2020 + * \author (original) Behrouz NematiPour + * \date (original) 19-Dec-2019 + * */ #include "tst_canbus.h" @@ -321,6 +322,16 @@ QVERIFY( ! _emited ); // Should not emit due to - ERROR : "Incorrect data for Message ID (HD) '0x0200'" } +void tst_canbus::tst_FrameInterface_FrameReceived_removeHead_EmptyList() +{ + FrameInterface frame; + frame.init(); + QVERIFY(frame._txFrameList.isEmpty()); + frame.removeHead(); + // if the code doesn't work and calls the removeFirst of and empty list it will assert. + QVERIFY(true); +} + void tst_canbus::cleanup() { }