harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-2131) [drlvm] C++ unit test infrastructure
Date Fri, 22 Jun 2007 13:01:26 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gregory Shimansky closed HARMONY-2131.
--------------------------------------


No response, assuming ok.

> [drlvm] C++ unit test infrastructure
> ------------------------------------
>
>                 Key: HARMONY-2131
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2131
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>         Environment: Linux/ia32, Windows/ia32
>            Reporter: Salikh Zakirov
>            Assignee: Gregory Shimansky
>         Attachments: Added-C-unit-test-infrastructure.patch, Added-C-unit-test-infrastructure.patch
>
>
> The attached patch provides C++ unit test infrastructure. The infrastructure is useful
in stand-alone testing
> of custom containers, such as ulist.h (unsorted list), which is used in JVMTI tags implementation.
> ulist.h already contains some unit tests, excluded from compilation by #ifndef UNIT_TEST.
> The unit tests must be formatted as follows:
> #include <unit_test.h>
> TEST(unit_test_name) {
>     /* unit test code */
>    TRACE("fine-level logging");            // logging can be used as well
>    LOG("more important logging");
>    INFO("even more important logging");
>    WARN("very important logging");
>    assert(1); // use assert() for verifying correct operation
> }
> unit_test_name must be a valid C++ identifier. It will be macro-expanded into function
name.
> The main program of the unit test must be arranged as follows:
> #include "unit_test_main.h"
> int main (int argc, char** argv) {
>     run(argc, argv);
> }
> By default, the unit test runs with INFO-level logging enabled, i.e. WARN and INFO message
will be printed out,
> while LOG and TRACE will not be. The logging level can be configured in the unit test
command line:
>   -Xtrace -- enable all logging message
>   -Xlog -- enable WARN, INFO and LOG logging messages
>   -Xinfo -- enable INFO and WARN logging messages  [default]
>   -Xwarn -- enable only WARN logging messages

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message