Files

copied
Last update 6 years 4 months by Nick
Filesteststest_util_comm_http
..
readme.md
test_util_comm_http.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::http (HTTP protocol helpers) 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:

  • 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 TestHTTPRequestHelper::getMethodOPTIONSexpectHTTPRequestMethodOPTIONS(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodGETexpectHTTPRequestMethodGET(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodHEADexpectHTTPRequestMethodHEAD(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodPOSTexpectHTTPRequestMethodPOST(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodPUTexpectHTTPRequestMethodPUT(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodDELETEexpectHTTPRequestMethodDELETE(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodTRACEexpectHTTPRequestMethodTRACE(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodCONNECTexpectHTTPRequestMethodCONNECT(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodUnknownexpectHTTPRequestMethodUNKNOWN(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPRequestHelper::getMethodCaseSensitiveexpectHTTPRequestMethodUNKNOWN(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigit0expect0(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigit9expect9(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigitaexpecta(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigitfexpectf(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigitAexpectA(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigitFexpectF(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigitNullCharexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigitSpaceexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeDigitPercentexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHex00expect00(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHex0Aexpect0A(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexA0expectA0(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexFFexpectFF(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHex0SpaceexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHex0PercentexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHex0MinusexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHex0hexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHex0xexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexSpace0expectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexPercent0expectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexMinus0expectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexh0expectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexx0expectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHex23Spaceexpect23(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexEmptyStringexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexSingleCharStringexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestHTTPHexCode::decodeHexNullStringexpectError(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodeplainURLexpectUnmodifiedURL(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodeURLwithPercentCodeexpectPercentCodeDecoded(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodeURLwithPlusexpectPlusSubstitutedWithSpace(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodeURLwithInvalidPercentCodeexpectPercentCodeNotDecodedUnmodifiedURL(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodeURLwithBrokenPercentCodeAtTheEndexpectUnmodifiedURL(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodeURLwithPercentCharAtTheEndexpectUnmodifiedURL(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodeemptyStringexpectEmptyString(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodezeroLengthexpectUnmodifiedURL(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodelengthSmallerThanActualexpectTruncatedString(), file testutilcommhttp.ino PASSED Test function started: static void TestURL::decodeNULLStringexpectMethodDoesNotCrash(), file testutilcomm_http.ino PASSED

---------------- TESTING FINISHED --------------- Test functions passed: 47 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