Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

catch

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

catch - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

include_dirs.js

4

docs/assertions.md

@@ -44,3 +44,3 @@ # Assertion Macros

* **REQUIRE_THROWS_AS(** _expression_ and _exception type_ **)** and
* **REQUIRE_THROWS_AS(** _expression_, _exception type_ **)** and
* **CHECK_THROWS_AS(** _expression_, _exception type_ **)**

@@ -65,2 +65,2 @@

[Home](../README.md)
[Home](../README.md)

@@ -11,2 +11,3 @@ # Integration with build systems

include(ExternalProject)
find_package(Git REQUIRED)

@@ -37,2 +38,2 @@ ExternalProject_Add(

enable_testing(true) # Enables unit-testing.
```
```

@@ -129,2 +129,4 @@ Catch works quite nicely without any command line options at all - but for those times when you want greater control the following options are available.

Sometimes exceptions are expected outside of one of the assertions that tests for them (perhaps thrown and caught within the code-under-test). The whole test case can be skipped when using ```-e``` by marking it with the ```[!throws]``` tag.
When running with this option any throw checking assertions are skipped so as not to contribute additional noise. Be careful if this affects the behaviour of subsequent tests.

@@ -131,0 +133,0 @@

@@ -101,3 +101,3 @@ # Getting Catch

Catch takes a different approach (to both NUnut and xUnit) that is a more natural fit for C++ and the C family of languages. This is best explaned through an example:
Catch takes a different approach (to both NUnit and xUnit) that is a more natural fit for C++ and the C family of languages. This is best explained through an example:

@@ -146,2 +146,3 @@ ```c++

```c++
SECTION( "reserving bigger changes capacity but not size" ) {

@@ -159,2 +160,3 @@ v.reserve( 10 );

}
```

@@ -161,0 +163,0 @@ Sections can be nested to an arbitrary depth (limited only by your stack size). Each leaf section (i.e. a section that contains no nested sections) will be executed exactly once, on a separate path of execution from any other leaf section (so no leaf section can interfere with another). Obviously a failure in a parent section will prevent nested sections from running - but that's the idea.

@@ -1,4 +0,4 @@

## What's new in Catch
## What's new in Catch for 1.0
This page has been added following quite a large (hopefully the last such) merge from the integration branch. Please read this summary through so you know what to expect (and whether any changes - breaking in some cases - will affect you).
After a long "developer preview" state Catch turned 1.0 in mid-2013. Just prior to this a large number of changes, some of them breaking, where merged from the integration branch and now form part of the 1.0 code-base. If this might affect you please read this summary through so you know what to expect.

@@ -5,0 +5,0 @@ * Calling Catch from your own ```main()``` has changed - please review [the updated docs](own-main.md)

{
"name": "catch",
"version": "0.0.1",
"version": "0.0.2",
"description": "catch C++ unit test framework",
"main": " ",
"main": "include_dirs.js",
"directories": {

@@ -7,0 +7,0 @@ "doc": "docs"

@@ -15,3 +15,2 @@ cmake_minimum_required(VERSION 2.8)

${SELF_TEST_DIR}/ClassTests.cpp
${SELF_TEST_DIR}/CmdLineTests.cpp
${SELF_TEST_DIR}/ConditionTests.cpp

@@ -18,0 +17,0 @@ ${SELF_TEST_DIR}/ExceptionTests.cpp

@@ -29,3 +29,3 @@

-------------------------------------------------------------------------------
Equality checks that should fail]
Equality checks that should fail
-------------------------------------------------------------------------------

@@ -101,3 +101,3 @@ ConditionTests.cpp:<line number>

-------------------------------------------------------------------------------
Inequality checks that should fails
Inequality checks that should fail
-------------------------------------------------------------------------------

@@ -337,2 +337,26 @@ ConditionTests.cpp:<line number>

-------------------------------------------------------------------------------
When unchecked exceptions are thrown during a REQUIRE the test should abort
fail
-------------------------------------------------------------------------------
ExceptionTests.cpp:<line number>
...............................................................................
ExceptionTests.cpp:<line number>: FAILED:
REQUIRE( thisThrows() == 0 )
due to unexpected exception with message:
expected exception
-------------------------------------------------------------------------------
When unchecked exceptions are thrown during a CHECK the test should abort and
fail
-------------------------------------------------------------------------------
ExceptionTests.cpp:<line number>
...............................................................................
ExceptionTests.cpp:<line number>: FAILED:
CHECK( thisThrows() == 0 )
due to unexpected exception with message:
expected exception
-------------------------------------------------------------------------------
Unexpected custom exceptions can be translated

@@ -503,2 +527,16 @@ -------------------------------------------------------------------------------

-------------------------------------------------------------------------------
Pointers can be converted to strings
-------------------------------------------------------------------------------
MessageTests.cpp:<line number>
...............................................................................
MessageTests.cpp:<line number>:
warning:
actual address of p: 0x<hex digits>
MessageTests.cpp:<line number>:
warning:
toString(p): 0x<hex digits>
-------------------------------------------------------------------------------
more nested SECTION tests

@@ -686,3 +724,3 @@ s1

-------------------------------------------------------------------------------
A couple of nested sections followed by a failure
Tabs and newlines show in output
-------------------------------------------------------------------------------

@@ -693,15 +731,13 @@ MiscTests.cpp:<line number>

MiscTests.cpp:<line number>: FAILED:
explicitly with message:
to infinity and beyond
CHECK( s1 == s2 )
with expansion:
"if ($b == 10) {
$a= 20;
}"
==
"if ($b == 10) {
$a = 20;
}
"
-------------------------------------------------------------------------------
A couple of nested sections followed by a failure
-------------------------------------------------------------------------------
MiscTests.cpp:<line number>
...............................................................................
MiscTests.cpp:<line number>: FAILED:
explicitly with message:
to infinity and beyond
hello

@@ -759,3 +795,3 @@ hello

===============================================================================
123 test cases - 36 failed (676 assertions - 91 failed)
124 test cases - 39 failed (695 assertions - 92 failed)

@@ -305,3 +305,3 @@

-------------------------------------------------------------------------------
Equality checks that should fail]
Equality checks that should fail
-------------------------------------------------------------------------------

@@ -308,0 +308,0 @@ ConditionTests.cpp:<line number>

<testsuites>
<testsuite name="~_" errors="10" failures="100" tests="695" hostname="tbd" time="{duration}" timestamp="tbd">
<testsuite errors="12" failures="100" tests="715" hostname="tbd" time="{duration}" timestamp="tbd">
<testcase classname="global" name="Some simple comparisons between doubles" time="{duration}"/>

@@ -23,3 +23,3 @@ <testcase classname="global" name="Approximate comparisons with different epsilons" time="{duration}"/>

<testcase classname="global" name="Equality checks that should succeed" time="{duration}"/>
<testcase classname="global" name="Equality checks that should fail]" time="{duration}">
<testcase classname="global" name="Equality checks that should fail" time="{duration}">
<failure message="7 == 6" type="CHECK">

@@ -66,3 +66,3 @@ ConditionTests.cpp:<line number>

<testcase classname="global" name="Inequality checks that should succeed" time="{duration}"/>
<testcase classname="global" name="Inequality checks that should fails" time="{duration}">
<testcase classname="global" name="Inequality checks that should fail" time="{duration}">
<failure message="7 != 7" type="CHECK">

@@ -215,2 +215,14 @@ ConditionTests.cpp:<line number>

</testcase>
<testcase classname="global" name="When unchecked exceptions are thrown during a REQUIRE the test should abort fail" time="{duration}">
<error message="thisThrows() == 0" type="REQUIRE">
expected exception
ExceptionTests.cpp:<line number>
</error>
</testcase>
<testcase classname="global" name="When unchecked exceptions are thrown during a CHECK the test should abort and fail" time="{duration}">
<error message="thisThrows() == 0" type="CHECK">
expected exception
ExceptionTests.cpp:<line number>
</error>
</testcase>
<testcase classname="global" name="Unexpected custom exceptions can be translated" time="{duration}">

@@ -313,2 +325,3 @@ <error type="TEST_CASE">

</testcase>
<testcase classname="global" name="Pointers can be converted to strings" time="{duration}"/>
<testcase classname="random SECTION tests" name="s1" time="{duration}"/>

@@ -318,3 +331,3 @@ <testcase classname="random SECTION tests" name="s2" time="{duration}"/>

<testcase classname="nested SECTION tests" name="s1/s2" time="{duration}"/>
<testcase classname="more nested SECTION tests" name="s1/s2" time="{duration}">
<testcase classname="more nested SECTION tests" name="s2/s1" time="{duration}">
<failure message="1 == 2" type="REQUIRE">

@@ -324,4 +337,2 @@ MiscTests.cpp:<line number>

</testcase>
<testcase classname="more nested SECTION tests" name="s1/s3" time="{duration}"/>
<testcase classname="more nested SECTION tests" name="s1/s4" time="{duration}"/>
<testcase classname="looped SECTION tests" name="s1" time="{duration}">

@@ -430,12 +441,17 @@ <failure message="0 > 1" type="CHECK">

</failure>
<failure type="FAIL">
to infinity and beyond
</testcase>
<testcase classname="A couple of nested sections followed by a failure" name="Outer/Inner" time="{duration}"/>
<testcase classname="global" name="not allowed" time="{duration}"/>
<testcase classname="global" name="Tabs and newlines show in output" time="{duration}">
<failure message="&quot;if ($b == 10) {
$a = 20;
}&quot;
==
&quot;if ($b == 10) {
$a = 20;
}
&quot;" type="CHECK">
MiscTests.cpp:<line number>
</failure>
<failure type="FAIL">
to infinity and beyond
MiscTests.cpp:<line number>
</failure>
</testcase>
<testcase classname="A couple of nested sections followed by a failure" name="Outer/Inner" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="default - no arguments" time="{duration}"/>

@@ -445,3 +461,2 @@ <testcase classname="Process can be configured on command line" name="test lists/1 test" time="{duration}"/>

<testcase classname="Process can be configured on command line" name="test lists/Specify one test case exclusion using ~" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="test lists/Specify two test cases using -t" time="{duration}"/>
<testcase classname="Process can be configured on command line" name="reporter/-r/console" time="{duration}"/>

@@ -461,13 +476,2 @@ <testcase classname="Process can be configured on command line" name="reporter/-r/xml" time="{duration}"/>

<testcase classname="Process can be configured on command line" name="combinations/Single character flags can be combined" time="{duration}"/>
<testcase classname="global" name="selftest/test filter" time="{duration}"/>
<testcase classname="global" name="selftest/test filters" time="{duration}"/>
<testcase classname="global" name="selftest/filter/prefix wildcard" time="{duration}"/>
<testcase classname="global" name="selftest/filter/wildcard at both ends" time="{duration}"/>
<testcase classname="selftest/tags" name="single [one] tag" time="{duration}"/>
<testcase classname="selftest/tags" name="single [two] tag" time="{duration}"/>
<testcase classname="selftest/tags" name="two tags" time="{duration}"/>
<testcase classname="selftest/tags" name="complex" time="{duration}"/>
<testcase classname="selftest/tags" name="one tag with characters either side" time="{duration}"/>
<testcase classname="selftest/tags" name="start of a tag, but not closed" time="{duration}"/>
<testcase classname="selftest/tags" name="hidden" time="{duration}"/>
<testcase classname="Long strings can be wrapped" name="plain string/No wrapping" time="{duration}"/>

@@ -528,2 +532,3 @@ <testcase classname="Long strings can be wrapped" name="plain string/Wrapped once" time="{duration}"/>

<testcase classname="global" name="pointer to class" time="{duration}"/>
<testcase classname="global" name="null_ptr" time="{duration}"/>
<testcase classname="global" name="X/level/0/a" time="{duration}"/>

@@ -533,2 +538,33 @@ <testcase classname="global" name="X/level/0/b" time="{duration}"/>

<testcase classname="global" name="X/level/1/b" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Empty test spec should have no filters" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Test spec from empty string should have no filters" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Test spec from just a comma should have no filters" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Test spec from name should have one filter" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Test spec from quoted name should have one filter" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Test spec from name should have one filter" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Wildcard at the start" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Wildcard at the end" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Wildcard at both ends" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Redundant wildcard at the start" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Redundant wildcard at the end" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Redundant wildcard at both ends" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Wildcard at both ends, redundant at start" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Just wildcard" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Single tag" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Single tag, two matches" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Two tags" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Two tags, spare separated" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Wildcarded name and tag" time="{duration}"/>
<testcase classname="Parse test names and tags" name="Single tag exclusion" time="{duration}"/>
<testcase classname="Parse test names and tags" name="One tag exclusion and one tag inclusion" time="{duration}"/>
<testcase classname="Parse test names and tags" name="One tag exclusion and one wldcarded name inclusion" time="{duration}"/>
<testcase classname="Parse test names and tags" name="One tag exclusion, using exclude:, and one wldcarded name inclusion" time="{duration}"/>
<testcase classname="Parse test names and tags" name="name exclusion" time="{duration}"/>
<testcase classname="Parse test names and tags" name="wildcarded name exclusion" time="{duration}"/>
<testcase classname="Parse test names and tags" name="wildcarded name exclusion with tag inclusion" time="{duration}"/>
<testcase classname="Parse test names and tags" name="wildcarded name exclusion, using exclude:, with tag inclusion" time="{duration}"/>
<testcase classname="Parse test names and tags" name="two wildcarded names" time="{duration}"/>
<testcase classname="Parse test names and tags" name="empty tag" time="{duration}"/>
<testcase classname="Parse test names and tags" name="empty quoted name" time="{duration}"/>
<testcase classname="Parse test names and tags" name="quoted string followed by tag exclusion" time="{duration}"/>
<testcase classname="global" name="Anonymous test case 1" time="{duration}"/>

@@ -544,15 +580,2 @@ <testcase classname="global" name="Test case with one argument" time="{duration}"/>

<testcase classname="Scenario: This is a really long scenario name to see how the list command deals with wrapping" name="Given: A section name that is so long that it cannot fit in a single console width/When: The test headers are printed as part of the normal running of the scenario/Then: The, deliberately very long and overly verbose (you see what I did there?) section names must wrap, along with an indent" time="{duration}"/>
<testcase classname="cmdline" name="process name" time="{duration}"/>
<testcase classname="cmdline" name="arg separated by spaces" time="{duration}"/>
<testcase classname="cmdline" name="arg separated by colon" time="{duration}"/>
<testcase classname="cmdline" name="arg separated by =" time="{duration}"/>
<testcase classname="cmdline" name="long opt" time="{duration}"/>
<testcase classname="cmdline" name="a number" time="{duration}"/>
<testcase classname="cmdline" name="not a number" time="{duration}"/>
<testcase classname="cmdline" name="two parsers" time="{duration}"/>
<testcase classname="cmdline" name="methods/in range" time="{duration}"/>
<testcase classname="cmdline" name="methods/out of range" time="{duration}"/>
<testcase classname="cmdline" name="flags/set" time="{duration}"/>
<testcase classname="cmdline" name="flags/not set" time="{duration}"/>
<testcase classname="cmdline" name="positional" time="{duration}"/>
<testcase classname="section tracking" name="root" time="{duration}"/>

@@ -559,0 +582,0 @@ <testcase classname="section tracking" name="test case with no sections" time="{duration}"/>

![catch logo](catch-logo-small.png)
*v1.0 build 26 (master branch)*
*v1.0 build 48 (master branch)*
Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch)
# New release with significant changes
[Please see this page if you are updating from a version before 1.0](docs/whats-changed.md)
[Please see this page for details - including some breaking changes](docs/whats-changed.md)
## What's the Catch?

@@ -12,0 +10,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc