Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326967 - Need an Assert_query() API to allow non-commital check of Assert expression.
Summary: Need an Assert_query() API to allow non-commital check of Assert expression.
Status: ASSIGNED
Alias: None
Product: RTSC
Classification: Technology
Component: Runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Sasha Slijepcevic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 15:48 EDT by Alan DeMars CLA
Modified: 2011-11-24 12:58 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan DeMars CLA 2010-10-04 15:48:19 EDT
Build Identifier: 3.20.05.69

There are situations where it would be convenient to know if an Assert_isTrue() will fail but perform some work prior to following the normal Assert() exit code.

An Assert_query() API would allow OPTIMIZED testing of the Assert expression. Assert_query() would be similarly boil-away-able as Assert_isTrue() in case Asserts are not enabled...

Bool Assert_query(expr, AssertID);

Example use case:

if (Assert_query((BIOS_getThreadType() != BIOS_ThreadTypeTask)), GateMutex_A_badContext) {
    BIOS_setThreadType(BIOS_ThreadType_Main);
    Assert_isTrue(FALSE, GateMutex_A_badContext);   
}

Reproducible: Always