Profile

Cover photo
10 followers|5,139 views
AboutPostsPhotosVideos

Stream

crpcut

Shared publicly  - 
 
clang 3.3 is out now. I just verified that, unsurprisingly, crpcut builds and works flawlessly with it.
1
Add a comment...

crpcut

Shared publicly  - 
 
Proof of concept code for matching regular expressions on stdout and stderr.

The code is a bit messy and needs cleaning up, and there's no handling of illegal regular expressions, but the general idea is there and not too tricky.

However, I would like some feedback from you on usability. Currently there's one macro EXPECT_REGEX() that takes the source (stdout or stderr) and a regular expression.

Is there a need for two sets of macros EXPECT_REGEX() and FAIL_ON_REGEX(), or some other name suggesting the idea that the regular expression must not match? If so, should both be allowed in parallel, requiring both to be true for the test to succeed?

How about multi-line matching? Should it always match the entire output regardless of regex::m, or should it match line by line if not multi-line, and consider any match (like the exit code from grep?)

Please comment below.
1
Add a comment...

crpcut

Shared publicly  - 
 
.deb's of 1.9.0 (patched to include libcrpcut_basic.so) for Ubuntu Precise and Quantal are available from launchpad.
2
Add a comment...

crpcut

Shared publicly  - 
 
1.9.0 is out

Woke up at silly o'clock in the morning and figured I might as well go ahead with the release.

1.9.0 is a feature enhancement release with the highlights being an additional library without heap instrumentation to enable tests of code that implements its own heap functions, abolished need to predefine tags when compiled with C++11, and an added attribute "location" to all violation reports in XML format.
1
Add a comment...

crpcut

Shared publicly  - 
 
The first thing to take advantage of yesterdays obscure string trick is test tags in crpcut. If test sources are compiled with c++11 (using -std=c++11 or -std=c++0x) with g++-4.6 or later, or clang++-3.1 or later, tags can be anything the preprocessor can parse, and the macro DEFINE_TEST_TAG() has become a no-op. This was pushed to sourceforge just minutes ago.
1
Add a comment...
Have them in circles
10 people
Jonas Larsson's profile photo
Martin Moene's profile photo

crpcut

Shared publicly  - 
 
Well, this explains the weird errors I've seen lately... 
1
Add a comment...

crpcut

Shared publicly  - 
 
1.9.2 was just made available. It supports old versions of CMake (I'm looking at you, Debian.) No functional changes.
1
Add a comment...

crpcut

Shared publicly  - 
 
Ops, 1.9.1 is out. It correctly installs libcrpcut_basic.so. Now that was a stupid thing to miss.
1
Add a comment...

crpcut

Shared publicly  - 
 
1.9.0 is getting near, probably this weekend. It is mostly a matter of proof-reading the documentation and most likely make some clarifying changes in them.

The split library issue has been solved by providing three .so files. libcrpcut.so is the same as it always was. libcrpcut_basic.so has the heap functionality removed. There is also a libcrpcut_heap.so available, but its use is only documented as being experimental.
1
Add a comment...

crpcut

Shared publicly  - 
 
Believe it or not, this is a key to bringing the long missing feature of matching stdout/stderr with regular expressions. It will take some time to implement, though, since there's more than one obstacle to overcome. This was the one obstacle I didn't know how to solve, though. The others just requires a lot of work.
1
Add a comment...
People
Have them in circles
10 people
Jonas Larsson's profile photo
Martin Moene's profile photo
Story
Tagline
the Compartmented Robust POSIX C++ Unit Test system
Introduction
With crpcut it is easy to write tests that other unit-test systems cannot manage.

Visit crpcut for online-manual and downloads.