Files

copied
Last update 6 years 10 months by Nick
Filesteststest_util_data
..
readme.md
test_util_data.ino
readme.md

Purpose of the tests

To confirm that any of the recent modifications of functions and classes in file util_data, namespace util did not introduce anomalies to their performance

Running the tests

Copy here all necessary files from main project directory. The files to be copied are as follows:

  • util_data.h
  • util_data.cpp

Copy here all necessary files from tests/common directory. The files to be copied are as follows:

  • fakestream.cpp
  • fakestream.h
  • test.h

Open .ino file in IDE, compile, upload and open serial monitor to observe test results

Expected test results

The following is expected in serial monitor window:

---------------- TESTING STARTED ----------------

Test function started: static void TestRef<T>::constructorAccessorinitRamPointerexpectSameRamPointer() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::constructorAccessorinitProgmemPointerexpectSameProgmemPointer() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::constructorAccessorinitNullptrPointerexpectNullptrPointer() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::operatorBoolnullptrRamexpectFalse() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::operatorBoolnullptrProgmemexpectFalse() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::operatorBoolnonNullptrRamexpectTrue() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::operatorBoolnonNullptrProgmemexpectTrue() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::assignmentinitRamPointerexpectSameRamPointer() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::assignmentinitProgmemPointerexpectSameProgmemPointer() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::assignmentinitNullptrPointerexpectNullptrPointer() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareSamePointerSameMemoryAreasexpectTrue() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareSamePointerDifferentMemoryAreasexpectFalse() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareDifferentPointerSameMemoryAreasexpectFalse() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareDifferentPointerDifferentMemoryAreasexpectFalse() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareNullptrsInRamexpectTrue() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareNullptrsInProgmemexpectTrue() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareNullptrsInDifferentMemoryAreasexpectTrue() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareNullptrToPointerexpectFalse() [with T = int], file testutildata.ino PASSED Test function started: static void TestRef<T>::constructorAccessorinitRamPointerexpectSameRamPointer() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::constructorAccessorinitProgmemPointerexpectSameProgmemPointer() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::constructorAccessorinitNullptrPointerexpectNullptrPointer() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::operatorBoolnullptrRamexpectFalse() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::operatorBoolnullptrProgmemexpectFalse() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::operatorBoolnonNullptrRamexpectTrue() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::operatorBoolnonNullptrProgmemexpectTrue() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::assignmentinitRamPointerexpectSameRamPointer() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::assignmentinitProgmemPointerexpectSameProgmemPointer() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::assignmentinitNullptrPointerexpectNullptrPointer() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareSamePointerSameMemoryAreasexpectTrue() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareSamePointerDifferentMemoryAreasexpectFalse() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareDifferentPointerSameMemoryAreasexpectFalse() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareDifferentPointerDifferentMemoryAreasexpectFalse() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareNullptrsInRamexpectTrue() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareNullptrsInProgmemexpectTrue() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareNullptrsInDifferentMemoryAreasexpectTrue() [with T = char], file testutildata.ino PASSED Test function started: static void TestRef<T>::equalOperatorcompareNullptrToPointerexpectFalse() [with T = char], file testutildata.ino PASSED Test function started: static void TestStrRef::strRefconstructorinitWithConstCharPointerexpectReferenceToCStringInRam(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefconstructorinitWithFlashStringHelperexpectReferenceToCStringInProgmem(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefgetCStringInRamexpectCStringCopied(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefgetCStringInProgmemexpectCStringCopied(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefgettooLongCStringInRamexpectCStringTruncated(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefgettooLongCStringInProgmemexpectCStringTruncated(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefgetnullptrInRamexpectEmptyBuffer(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefgetnullptrInProgmemexpectEmptyBuffer(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefgetemptyStringexpectEmptyBuffer(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefgetbufferSizeZeroexpectBufferNotModified(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefprintprintCStringInRamexpectCStringPrintedCorrectly(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefprintprintCStringInProgmemexpectCStringPrintedCorrectly(), file testutildata.ino PASSED Test function started: static void TestStrRef::strRefprintprintNullptrexpectNothingPrinted(), file testutil_data.ino PASSED sizeof(util::StrRef) 8

---------------- TESTING FINISHED --------------- Test functions passed: 49 Test functions failed: 0

Note: class sizes are for reference only.

Failed tests

The following example illustrates failed tests reporting:

Test function started: static void test(), file test.ino FAILED in line 1, file test.ino

Report a bug