Files

copied
Last update 6 years 4 months by Nick
Filesteststest_util_comm_json
..
readme.md
test_util_comm_json.ino
readme.md

Purpose of the tests

To confirm that any of the recent modifications of utility functions and/or classes in file util_comm, namespace util::json (JSON generation) did not introduce anomalies to function and/or class performance

Running the tests

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

  • util_comm.cpp
  • util_comm.h

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 TestFakeStream::beginIninputInitexpectCorrectInputInBuffer(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::readIninputReadexpectCorrectCharsRead(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::readIninputReadUnavailableexpectUnavailable(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::writeOutprintStringexpectTheSameStringInTheOutBuffer(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::beginInOutinputInitexpectCorrectInputInBuffer(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::readInOutinputReadexpectCorrectCharsRead(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::readInOutinputReadUnavailableexpectUnavailable(), file fakestream.cpp PASSED Test function started: static void TestFakeStream::writeInOutprintStringexpectTheSameStringInTheOutBuffer(), file fakestream.cpp PASSED Test function started: static void TestJSONOutput::valueaddToObjectexpectCorrectValuesAdded(), file testutilcommjson.ino PASSED Test function started: static void TestJSONOutput::valueaddToArrayexpectCorrectValuesAddedNamesIgnored(), file testutilcommjson.ino PASSED Test function started: static void TestJSONOutput::structurenestingexpectCorrectJSON(), file testutilcomm_json.ino PASSED

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

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