JPCRE2  10.31.02
C++ wrapper for PCRE2 library
test.cpp File Reference

A test experimenting on different situations (sanity check). More...

#include <iostream>
#include <cassert>
#include "jpcre2.hpp"
+ Include dependency graph for test.cpp:

Detailed Description

A test experimenting on different situations (sanity check).

The goal of this test is to go through every nook and cranny of the library and touch every bit of code. Most of this test is just to see if there's any major error like segfault or memory leak. It is also to measure the efficiency of various blocks of code.

Primary goals of this test:

  1. Check for memory leak
  2. Check for segfault.
  3. Some test on input/output (assert).
  4. Estimate code coverage.


  • This test is not intended for client review, it's primarily for developers to make sure nothing is broken.
  • This test doesn't check for input/output (mostly) i.e only calls are made, validity of output is not tested. See testio.cpp for input/output test.
Md Jahidul Hamid