TianoCore EDK2 master
Loading...
Searching...
No Matches
SampleUnitTestExpectFail.c
Go to the documentation of this file.
1
11#include <PiPei.h>
12#include <Uefi.h>
13#include <Library/UefiLib.h>
14#include <Library/DebugLib.h>
15#include <Library/UnitTestLib.h>
16#include <Library/PrintLib.h>
17
18#define UNIT_TEST_NAME "Sample Unit Test Expect Fail"
19#define UNIT_TEST_VERSION "0.1"
20
25VOID *mSampleGlobalTestPointer = NULL;
26
49EFIAPI
51 IN UNIT_TEST_CONTEXT Context
52 )
53{
54 UT_ASSERT_NOT_EQUAL ((UINTN)mSampleGlobalTestPointer, (UINTN)NULL);
55 return UNIT_TEST_PASSED;
56}
57
80VOID
81EFIAPI
83 IN UNIT_TEST_CONTEXT Context
84 )
85{
86 mSampleGlobalTestPointer = NULL;
87}
88
106EFIAPI
108 IN UNIT_TEST_CONTEXT Context
109 )
110{
111 UINTN A;
112 UINTN B;
113 UINTN C;
114
115 A = 1;
116 B = 1;
117 C = A + B;
118
119 UT_ASSERT_NOT_EQUAL (C, 2);
120
121 return UNIT_TEST_PASSED;
122}
123
140EFIAPI
142 IN UNIT_TEST_CONTEXT Context
143 )
144{
147
150
151 return UNIT_TEST_PASSED;
152}
153
171EFIAPI
173 IN UNIT_TEST_CONTEXT Context
174 )
175{
176 //
177 // Example of logging.
178 //
179 UT_LOG_WARNING ("About to change a global pointer! Current value is 0x%X\n", mSampleGlobalTestPointer);
180
181 mSampleGlobalTestPointer = (VOID *)-1;
182 UT_ASSERT_NOT_EQUAL ((UINTN)mSampleGlobalTestPointer, (UINTN)((VOID *)-1));
183 return UNIT_TEST_PASSED;
184}
185
189VOID
190EFIAPI
192 VOID
193 )
194{
195 //
196 // Set BIT0 (DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED)
197 //
198 PatchPcdSet8 (PcdDebugPropertyMask, PcdGet8 (PcdDebugPropertyMask) | BIT0);
199}
200
204VOID
205EFIAPI
207 VOID
208 )
209{
210 //
211 // Clear BIT0 (DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED)
212 //
213 PatchPcdSet8 (PcdDebugPropertyMask, PcdGet8 (PcdDebugPropertyMask) & (~BIT0));
214}
215
232EFIAPI
234 IN UNIT_TEST_CONTEXT Context
235 )
236{
237 UINT64 Result;
238
239 //
240 // This test passes because expression always evaluated to TRUE.
241 //
243
244 //
245 // This test passes because expression always evaluates to TRUE.
246 //
247 Result = LShiftU64 (BIT0, 1);
248 UT_ASSERT_FALSE (Result == BIT1);
249
250 return UNIT_TEST_PASSED;
251}
252
269EFIAPI
271 IN UNIT_TEST_CONTEXT Context
272 )
273{
274 UINT64 Result;
275
276 //
277 // This test passes because expression always evaluated to FALSE.
278 //
280
281 //
282 // This test passes because expression always evaluates to FALSE.
283 //
284 Result = LShiftU64 (BIT0, 1);
285 UT_ASSERT_TRUE (Result == BIT0);
286
287 return UNIT_TEST_PASSED;
288}
289
306EFIAPI
308 IN UNIT_TEST_CONTEXT Context
309 )
310{
311 UINT64 Result;
312
313 //
314 // This test passes because both values are always equal.
315 //
316 UT_ASSERT_NOT_EQUAL (1, 1);
317
318 //
319 // This test passes because both values are always equal.
320 //
321 Result = LShiftU64 (BIT0, 1);
322 UT_ASSERT_NOT_EQUAL (Result, BIT1);
323
324 return UNIT_TEST_PASSED;
325}
326
343EFIAPI
345 IN UNIT_TEST_CONTEXT Context
346 )
347{
348 CHAR8 *String1;
349 CHAR8 *String2;
350 UINTN Length;
351
352 //
353 // This test passes because String1 and String2 are the same.
354 //
355 String1 = "Hello1";
356 String2 = "Hello2";
357 Length = sizeof ("Hello1");
358 UT_ASSERT_MEM_EQUAL (String1, String2, Length);
359
360 return UNIT_TEST_PASSED;
361}
362
379EFIAPI
381 IN UNIT_TEST_CONTEXT Context
382 )
383{
384 UINT64 Result;
385
386 //
387 // This test passes because both values are never equal.
388 //
389 UT_ASSERT_EQUAL (0, 1);
390
391 //
392 // This test passes because both values are never equal.
393 //
394 Result = LShiftU64 (BIT0, 1);
395 UT_ASSERT_EQUAL (Result, BIT0);
396
397 return UNIT_TEST_PASSED;
398}
399
416EFIAPI
418 IN UNIT_TEST_CONTEXT Context
419 )
420{
421 //
422 // This test passes because the status is not an EFI error.
423 //
424 UT_ASSERT_NOT_EFI_ERROR (EFI_INVALID_PARAMETER);
425
426 //
427 // This test passes because the status is not an EFI error.
428 //
429 UT_ASSERT_NOT_EFI_ERROR (EFI_BUFFER_TOO_SMALL);
430
431 return UNIT_TEST_PASSED;
432}
433
450EFIAPI
452 IN UNIT_TEST_CONTEXT Context
453 )
454{
455 //
456 // This test passes because the status value are always equal.
457 //
458 UT_ASSERT_STATUS_EQUAL (EFI_SUCCESS, EFI_NOT_FOUND);
459
460 return UNIT_TEST_PASSED;
461}
462
479EFIAPI
481 IN UNIT_TEST_CONTEXT Context
482 )
483{
484 //
485 // This test passes because the pointer is never NULL.
486 //
488
489 return UNIT_TEST_PASSED;
490}
491
508EFIAPI
510 IN UNIT_TEST_CONTEXT Context
511 )
512{
513 //
514 // Skip tests that verify an ASSERT() is triggered if ASSERT()s are disabled.
515 //
516 if ((PcdGet8 (PcdDebugPropertyMask) & BIT0) == 0x00) {
518 return UNIT_TEST_PASSED;
519 }
520
521 //
522 // This test passes because it directly triggers an ASSERT().
523 //
525
526 //
527 // This test passes because DecimalToBcd() generates an ASSERT() if the
528 // value passed in is >= 100. The expected ASSERT() is caught by the unit
529 // test framework and UT_EXPECT_ASSERT_FAILURE() returns without an error.
530 //
532
533 return UNIT_TEST_PASSED;
534}
535
552EFIAPI
554 IN UNIT_TEST_CONTEXT Context
555 )
556{
557 //
558 // Skip tests that verify an ASSERT() is triggered if ASSERT()s are disabled.
559 //
560 if ((PcdGet8 (PcdDebugPropertyMask) & BIT0) == 0x00) {
562 return UNIT_TEST_PASSED;
563 }
564
565 //
566 // This test fails because DecimalToBcd() generates an ASSERT() if the
567 // value passed in is >= 100. The unexpected ASSERT() is caught by the unit
568 // test framework and generates a failed test.
569 //
570 DecimalToBcd8 (101);
571
572 return UNIT_TEST_PASSED;
573}
574
591EFIAPI
593 IN UNIT_TEST_CONTEXT Context
594 )
595{
596 //
597 // Example of logging.
598 //
599 UT_LOG_ERROR ("UT_LOG_ERROR() message\n");
600
602
603 return UNIT_TEST_PASSED;
604}
605
622EFIAPI
624 IN UNIT_TEST_CONTEXT Context
625 )
626{
627 //
628 // Example of logging.
629 //
630 UT_LOG_WARNING ("UT_LOG_WARNING() message\n");
631
633
634 return UNIT_TEST_PASSED;
635}
636
653EFIAPI
655 IN UNIT_TEST_CONTEXT Context
656 )
657{
658 //
659 // Example of logging.
660 //
661 UT_LOG_INFO ("UT_LOG_INFO() message\n");
662
664
665 return UNIT_TEST_PASSED;
666}
667
684EFIAPI
686 IN UNIT_TEST_CONTEXT Context
687 )
688{
689 //
690 // Example of logging.
691 //
692 UT_LOG_VERBOSE ("UT_LOG_VERBOSE() message\n");
693
695
696 return UNIT_TEST_PASSED;
697}
698
708EFIAPI
710 VOID
711 )
712{
713 EFI_STATUS Status;
714 UNIT_TEST_FRAMEWORK_HANDLE Framework;
715 UNIT_TEST_SUITE_HANDLE SimpleMathTests;
716 UNIT_TEST_SUITE_HANDLE GlobalVarTests;
717 UNIT_TEST_SUITE_HANDLE MacroTestsAssertsEnabled;
718 UNIT_TEST_SUITE_HANDLE MacroTestsAssertsDisabled;
719
720 Framework = NULL;
721
722 DEBUG ((DEBUG_INFO, "%a v%a\n", UNIT_TEST_NAME, UNIT_TEST_VERSION));
723
724 //
725 // Start setting up the test framework for running the tests.
726 //
727 Status = InitUnitTestFramework (&Framework, UNIT_TEST_NAME, gEfiCallerBaseName, UNIT_TEST_VERSION);
728 if (EFI_ERROR (Status)) {
729 DEBUG ((DEBUG_ERROR, "Failed in InitUnitTestFramework. Status = %r\n", Status));
730 goto EXIT;
731 }
732
733 //
734 // Populate the SimpleMathTests Unit Test Suite.
735 //
736 Status = CreateUnitTestSuite (&SimpleMathTests, Framework, "Simple Math Tests", "Sample.Math", NULL, NULL);
737 if (EFI_ERROR (Status)) {
738 DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for SimpleMathTests\n"));
739 Status = EFI_OUT_OF_RESOURCES;
740 goto EXIT;
741 }
742
743 AddTestCase (SimpleMathTests, "Adding 1 to 1 should produce 2", "Addition", OnePlusOneShouldEqualTwo, NULL, NULL, NULL);
744
745 //
746 // Populate the GlobalVarTests Unit Test Suite.
747 //
748 Status = CreateUnitTestSuite (&GlobalVarTests, Framework, "Global Variable Tests", "Sample.Globals", NULL, NULL);
749 if (EFI_ERROR (Status)) {
750 DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for GlobalVarTests\n"));
751 Status = EFI_OUT_OF_RESOURCES;
752 goto EXIT;
753 }
754
755 AddTestCase (GlobalVarTests, "You should be able to change a global BOOLEAN", "Boolean", GlobalBooleanShouldBeChangeable, NULL, NULL, NULL);
756 AddTestCase (GlobalVarTests, "You should be able to change a global pointer", "Pointer", GlobalPointerShouldBeChangeable, MakeSureThatPointerIsNull, ClearThePointer, NULL);
757
758 //
759 // Populate the Macro Tests with ASSERT() enabled
760 //
761 Status = CreateUnitTestSuite (&MacroTestsAssertsEnabled, Framework, "Macro Tests with ASSERT() enabled", "Sample.MacroAssertsEnabled", TestSuiteEnableAsserts, NULL);
762 if (EFI_ERROR (Status)) {
763 DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for MacroTestsAssertsEnabled\n"));
764 Status = EFI_OUT_OF_RESOURCES;
765 goto EXIT;
766 }
767
768 AddTestCase (MacroTestsAssertsEnabled, "Test UT_ASSERT_TRUE() macro", "MacroUtAssertTrue", MacroUtAssertTrue, NULL, NULL, NULL);
769 AddTestCase (MacroTestsAssertsEnabled, "Test UT_ASSERT_FALSE() macro", "MacroUtAssertFalse", MacroUtAssertFalse, NULL, NULL, NULL);
770 AddTestCase (MacroTestsAssertsEnabled, "Test UT_ASSERT_EQUAL() macro", "MacroUtAssertEqual", MacroUtAssertEqual, NULL, NULL, NULL);
771 AddTestCase (MacroTestsAssertsEnabled, "Test UT_ASSERT_MEM_EQUAL() macro", "MacroUtAssertMemEqual", MacroUtAssertMemEqual, NULL, NULL, NULL);
772 AddTestCase (MacroTestsAssertsEnabled, "Test UT_ASSERT_NOT_EQUAL() macro", "MacroUtAssertNotEqual", MacroUtAssertNotEqual, NULL, NULL, NULL);
773 AddTestCase (MacroTestsAssertsEnabled, "Test UT_ASSERT_NOT_EFI_ERROR() macro", "MacroUtAssertNotEfiError", MacroUtAssertNotEfiError, NULL, NULL, NULL);
774 AddTestCase (MacroTestsAssertsEnabled, "Test UT_ASSERT_STATUS_EQUAL() macro", "MacroUtAssertStatusEqual", MacroUtAssertStatusEqual, NULL, NULL, NULL);
775 AddTestCase (MacroTestsAssertsEnabled, "Test UT_ASSERT_NOT_NULL() macro", "MacroUtAssertNotNull", MacroUtAssertNotNull, NULL, NULL, NULL);
776 AddTestCase (MacroTestsAssertsEnabled, "Test UT_EXPECT_ASSERT_FAILURE() macro", "MacroUtExpectAssertFailure", MacroUtExpectAssertFailure, NULL, NULL, NULL);
777 AddTestCase (MacroTestsAssertsEnabled, "Test Unexpected ASSERT()", "GenerateUnexpectedAssert", GenerateUnexpectedAssert, NULL, NULL, NULL);
778
779 AddTestCase (MacroTestsAssertsEnabled, "Test UT_LOG_ERROR() macro", "MacroUtLogError", MacroUtLogError, NULL, NULL, NULL);
780 AddTestCase (MacroTestsAssertsEnabled, "Test UT_LOG_WARNING() macro", "MacroUtLogWarning", MacroUtLogWarning, NULL, NULL, NULL);
781 AddTestCase (MacroTestsAssertsEnabled, "Test UT_LOG_INFO() macro", "MacroUtLogInfo", MacroUtLogInfo, NULL, NULL, NULL);
782 AddTestCase (MacroTestsAssertsEnabled, "Test UT_LOG_VERBOSE() macro", "MacroUtLogVerbose", MacroUtLogVerbose, NULL, NULL, NULL);
783
784 //
785 // Populate the Macro Tests with ASSERT() disabled
786 //
787 Status = CreateUnitTestSuite (&MacroTestsAssertsDisabled, Framework, "Macro Tests with ASSERT() disabled", "Sample.MacroAssertsDisables", TestSuiteDisableAsserts, NULL);
788 if (EFI_ERROR (Status)) {
789 DEBUG ((DEBUG_ERROR, "Failed in CreateUnitTestSuite for MacroTestsAssertsDisabled\n"));
790 Status = EFI_OUT_OF_RESOURCES;
791 goto EXIT;
792 }
793
794 AddTestCase (MacroTestsAssertsDisabled, "Test UT_ASSERT_TRUE() macro", "MacroUtAssertTrue", MacroUtAssertTrue, NULL, NULL, NULL);
795 AddTestCase (MacroTestsAssertsDisabled, "Test UT_ASSERT_FALSE() macro", "MacroUtAssertFalse", MacroUtAssertFalse, NULL, NULL, NULL);
796 AddTestCase (MacroTestsAssertsDisabled, "Test UT_ASSERT_EQUAL() macro", "MacroUtAssertEqual", MacroUtAssertEqual, NULL, NULL, NULL);
797 AddTestCase (MacroTestsAssertsDisabled, "Test UT_ASSERT_MEM_EQUAL() macro", "MacroUtAssertMemEqual", MacroUtAssertMemEqual, NULL, NULL, NULL);
798 AddTestCase (MacroTestsAssertsDisabled, "Test UT_ASSERT_NOT_EQUAL() macro", "MacroUtAssertNotEqual", MacroUtAssertNotEqual, NULL, NULL, NULL);
799 AddTestCase (MacroTestsAssertsDisabled, "Test UT_ASSERT_NOT_EFI_ERROR() macro", "MacroUtAssertNotEfiError", MacroUtAssertNotEfiError, NULL, NULL, NULL);
800 AddTestCase (MacroTestsAssertsDisabled, "Test UT_ASSERT_STATUS_EQUAL() macro", "MacroUtAssertStatusEqual", MacroUtAssertStatusEqual, NULL, NULL, NULL);
801 AddTestCase (MacroTestsAssertsDisabled, "Test UT_ASSERT_NOT_NULL() macro", "MacroUtAssertNotNull", MacroUtAssertNotNull, NULL, NULL, NULL);
802 AddTestCase (MacroTestsAssertsDisabled, "Test UT_EXPECT_ASSERT_FAILURE() macro", "MacroUtExpectAssertFailure", MacroUtExpectAssertFailure, NULL, NULL, NULL);
803
804 AddTestCase (MacroTestsAssertsDisabled, "Test Unexpected ASSERT()", "GenerateUnexpectedAssert", GenerateUnexpectedAssert, NULL, NULL, NULL);
805
806 AddTestCase (MacroTestsAssertsDisabled, "Test UT_LOG_ERROR() macro", "MacroUtLogError", MacroUtLogError, NULL, NULL, NULL);
807 AddTestCase (MacroTestsAssertsDisabled, "Test UT_LOG_WARNING() macro", "MacroUtLogWarning", MacroUtLogWarning, NULL, NULL, NULL);
808 AddTestCase (MacroTestsAssertsDisabled, "Test UT_LOG_INFO() macro", "MacroUtLogInfo", MacroUtLogInfo, NULL, NULL, NULL);
809 AddTestCase (MacroTestsAssertsDisabled, "Test UT_LOG_VERBOSE() macro", "MacroUtLogVerbose", MacroUtLogVerbose, NULL, NULL, NULL);
810
811 //
812 // Execute the tests.
813 //
814 Status = RunAllTestSuites (Framework);
815
816EXIT:
817 if (Framework) {
818 FreeUnitTestFramework (Framework);
819 }
820
821 return Status;
822}
823
828EFIAPI
830 IN EFI_PEI_FILE_HANDLE FileHandle,
831 IN CONST EFI_PEI_SERVICES **PeiServices
832 )
833{
834 return UefiTestMain ();
835}
836
842EFIAPI
844 IN EFI_HANDLE ImageHandle,
845 IN EFI_SYSTEM_TABLE *SystemTable
846 )
847{
848 return UefiTestMain ();
849}
850
854int
856 int argc,
857 char *argv[]
858 )
859{
860 return UefiTestMain ();
861}
UINT64 UINTN
UINT8 EFIAPI DecimalToBcd8(IN UINT8 Value)
Definition: String.c:1653
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
Definition: LShiftU64.c:28
int main()
=== TEST ENGINE ================================================================================
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define DEBUG(Expression)
Definition: DebugLib.h:434
#define PcdGet8(TokenName)
Definition: PcdLib.h:336
#define PatchPcdSet8(TokenName, Value)
Definition: PcdLib.h:233
VOID * EFI_PEI_FILE_HANDLE
Definition: PiPeiCis.h:26
UNIT_TEST_STATUS EFIAPI OnePlusOneShouldEqualTwo(IN UNIT_TEST_CONTEXT Context)
VOID EFIAPI ClearThePointer(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtLogInfo(IN UNIT_TEST_CONTEXT Context)
EFI_STATUS EFIAPI UefiTestMain(VOID)
UNIT_TEST_STATUS EFIAPI MacroUtAssertNotEfiError(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI GlobalPointerShouldBeChangeable(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtAssertTrue(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtAssertEqual(IN UNIT_TEST_CONTEXT Context)
VOID EFIAPI TestSuiteDisableAsserts(VOID)
UNIT_TEST_STATUS EFIAPI GlobalBooleanShouldBeChangeable(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI GenerateUnexpectedAssert(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtLogError(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtAssertNotEqual(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtAssertNotNull(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtAssertStatusEqual(IN UNIT_TEST_CONTEXT Context)
VOID EFIAPI TestSuiteEnableAsserts(VOID)
EFI_STATUS EFIAPI DxeEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
UNIT_TEST_STATUS EFIAPI MacroUtAssertMemEqual(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtExpectAssertFailure(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtLogVerbose(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtLogWarning(IN UNIT_TEST_CONTEXT Context)
EFI_STATUS EFIAPI PeiEntryPoint(IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices)
UNIT_TEST_STATUS EFIAPI MakeSureThatPointerIsNull(IN UNIT_TEST_CONTEXT Context)
UNIT_TEST_STATUS EFIAPI MacroUtAssertFalse(IN UNIT_TEST_CONTEXT Context)
BOOLEAN mSampleGlobalTestBoolean
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_STATUS EFIAPI RunAllTestSuites(IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle)
Definition: RunTests.c:145
#define UT_ASSERT_NOT_NULL(Pointer)
Definition: UnitTestLib.h:439
#define UT_LOG_ERROR(Format,...)
Definition: UnitTestLib.h:791
#define UT_ASSERT_NOT_EQUAL(ValueA, ValueB)
Definition: UnitTestLib.h:402
VOID * UNIT_TEST_CONTEXT
Definition: UnitTestLib.h:54
#define UT_EXPECT_ASSERT_FAILURE(FunctionCall, Status)
Definition: UnitTestLib.h:491
#define UT_ASSERT_MEM_EQUAL(BufferA, BufferB, Length)
Definition: UnitTestLib.h:389
#define UT_ASSERT_TRUE(Expression)
Definition: UnitTestLib.h:350
#define UT_ASSERT_EQUAL(ValueA, ValueB)
Definition: UnitTestLib.h:375
#define UT_ASSERT_STATUS_EQUAL(Status, Expected)
Definition: UnitTestLib.h:427
#define UT_LOG_INFO(Format,...)
Definition: UnitTestLib.h:813
EFI_STATUS EFIAPI CreateUnitTestSuite(OUT UNIT_TEST_SUITE_HANDLE *SuiteHandle, IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle, IN CHAR8 *Title, IN CHAR8 *Name, IN UNIT_TEST_SUITE_SETUP Setup OPTIONAL, IN UNIT_TEST_SUITE_TEARDOWN Teardown OPTIONAL)
Definition: UnitTestLib.c:326
EFI_STATUS EFIAPI FreeUnitTestFramework(IN UNIT_TEST_FRAMEWORK_HANDLE FrameworkHandle)
Definition: UnitTestLib.c:150
#define UT_LOG_VERBOSE(Format,...)
Definition: UnitTestLib.h:824
EFI_STATUS EFIAPI AddTestCase(IN UNIT_TEST_SUITE_HANDLE SuiteHandle, IN CHAR8 *Description, IN CHAR8 *Name, IN UNIT_TEST_FUNCTION Function, IN UNIT_TEST_PREREQUISITE Prerequisite OPTIONAL, IN UNIT_TEST_CLEANUP CleanUp OPTIONAL, IN UNIT_TEST_CONTEXT Context OPTIONAL)
Definition: UnitTestLib.c:426
#define UT_LOG_WARNING(Format,...)
Definition: UnitTestLib.h:802
EFI_STATUS EFIAPI InitUnitTestFramework(OUT UNIT_TEST_FRAMEWORK_HANDLE *FrameworkHandle, IN CHAR8 *Title, IN CHAR8 *ShortTitle, IN CHAR8 *VersionString)
Definition: UnitTestLib.c:204
UINT32 UNIT_TEST_STATUS
Definition: UnitTestLib.h:16
#define UT_ASSERT_FALSE(Expression)
Definition: UnitTestLib.h:362
#define UT_ASSERT_NOT_EFI_ERROR(Status)
Definition: UnitTestLib.h:414