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

ASF GitHub Bot commented on PROTON-1887:
----------------------------------------

GitHub user alanconway opened a pull request:

    https://github.com/apache/qpid-proton/pull/168

    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.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alanconway/qpid-proton c-catch-tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/qpid-proton/pull/168.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #168
    
----
commit a9388dd42739ec5134db6f34da6545d2142f4ce9
Author: Alan Conway <aconway@...>
Date:   2018-11-14T22:12:51Z

    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
>
> 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: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to