2 Commits
Author SHA1 Message Date
Michael D Kinney 5d29e2d020 UnitTestFramewokPkg/SampleUnitTest: Use UT_EXPECT_ASSERT_FAILURE()
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2801

Add samples for all UnitTestLib macros including using
UT_EXPECT_ASSERT_FAILURE() for positive test cases where an
ASSERT() is triggered and detected correctly.

Additional test cases are added that disable ASSERT()s and
verify that UT_EXPECT_ASSERT_FAILURE() macros are skipped.

Cc: Sean Brogan <[email protected]>
Cc: Bret Barkelew <[email protected]>
Cc: Jiewen Yao <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
2020-07-15 05:25:21 +00:00
Michael D Kinney f74abe4a2c UnitTestFrameworkPkg/Test: Add unit test samples
https://bugzilla.tianocore.org/show_bug.cgi?id=2505

Add an implementation of a sample unit test that
demonstrates the use of the UnitTestLib services and
macros and supports being built for execution in a
host environment or for execution on a target in PEI,
DXE, SMM, or UEFI Shell.

Cc: Sean Brogan <[email protected]>
Cc: Bret Barkelew <[email protected]>
Signed-off-by: Michael D Kinney <[email protected]>
Reviewed-by: Bret Barkelew <[email protected]>
2020-02-07 19:18:53 +00:00