[ 
https://issues.apache.org/jira/browse/PROTON-1887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16692389#comment-16692389
 ] 

ASF subversion and git services commented on PROTON-1887:
---------------------------------------------------------

Commit 0bdba37da9fbce7db4db106c21c1393ef6f1b433 in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=0bdba37 ]

PROTON-1887: [c] Convert C tests to use Catch2 harness.

Convert c/tests from home-baked test macros to the Catch2 test harness.
We are using version 1.x until we can move on from supporting C++03.
https://github.com/catchorg/Catch2/tree/Catch1.x

Added files:

test/include/
- catch.hpp - the Catch2 version 1.x framework in a single header.
- catch_extra.hpp - added Catch::Matcher support for C-string comparisons

c/tests/
- pn_test.hpp/.cpp - tools for testing the core library
  - auto_free<> - scoped freeing of pn_xxx_t*
  - matchers to check pn_condition/error_t with useful output
  - driver class to pump a pn_connection_driver_t and check events
    - trivial in-memory copy transport, no networking needed.
- pn_test_proactor.hpp/cpp - tools for testing the proactor library
  - proactor to pump a pn_proactor and check events.
  - same handler as driver above.

Renamed tests files: c/tests/*.c => c/tests/*_test.cpp

Tests are now linked into 3 executables:

- c-core-test - tests for libqpid-proton-core API
- c-extra-test - tests for the "extra" deprecated API in libqpid-proton
- c-proactor-test - tests for the proactor API in libqpid-proton-proactor

Individual tests or subsets can be run via command line arguments, run with
"-h" for a summary, or see 
https://github.com/catchorg/Catch2/blob/Catch1.x/docs/command-line.md

NOTE: Catch2 allows multiple "tags" to be associated with each test to easily
define different test sets. We're not using this feature yet, we could use it to
identify a fast self-test set, a long-running stress test set etc.


> [c] Introduce external C test harness for C tests
> -------------------------------------------------
>
>                 Key: PROTON-1887
>                 URL: https://issues.apache.org/jira/browse/PROTON-1887
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-c
>    Affects Versions: proton-c-0.24.0
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>            Priority: Major
>             Fix For: proton-c-0.27.0
>
>
> Investigate & choose an existing well-known C test framework for use in C 
> testing.
> Port existing C tests from our local test macros to the new framework.
> Long term we should migrate some of the tests in python that are really 
> testing the C core, but that is not part of this task.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to