]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/PCD/Test/PcdTest.c
Fix gcc build break. Slashes should always lean forward!
[mirror_edk2.git] / EdkModulePkg / Universal / PCD / Test / PcdTest.c
index 77e25ac2b6811eeea9743dad4f0215e9d0089714..21fa67a6aa9789e1a9d9642cf251c37b400f9af7 100644 (file)
@@ -38,59 +38,25 @@ DoTest(
   VOID\r
   )\r
 {\r
-  PCD_TOKEN_NUMBER tn;\r
-  UINTN Size;\r
-  VOID * Ptr;\r
-  UINT32 Uint32;\r
-  UINT32 Uint32a;\r
-  UINT64 Uint64;\r
-  UINT64 Uint64a;\r
-  INTN i;\r
-\r
-  tn = 0x00001000;\r
-\r
-  Size = LibPcdGetSize (tn);\r
-  Ptr = LibPcdGetPtr (tn); /* a:RW;2880;512!e:RW;262144;512 */\r
-  \r
-  tn = 0x00001001;\r
-  Size = LibPcdGetSize (tn); /* FW;40960;512 */\r
-  \r
-  tn = 0x00001002;\r
-  Size = LibPcdGetSize (tn); /* FW;40960;512 */\r
-  Ptr = LibPcdGetPtr (tn);\r
-  \r
-  LibPcdSetSku (0x0a);\r
-  tn = 0x2233;\r
-  Uint64 = LibPcdGet64 (tn);\r
-  \r
-  LibPcdSetSku (0x0b);\r
-  Uint64 = LibPcdGet64 (tn);\r
-  \r
-  LibPcdSetSku (0x0c);\r
-  Uint64a = LibPcdGet64 (tn);\r
-  \r
-  LibPcdSetSku (0);\r
-  tn = 0x2233;\r
-  Uint64 = LibPcdGet64 (tn);\r
-  \r
-  \r
-  tn = 0xfaceface;\r
-  Size = LibPcdGetExSize (&Guid1, tn);\r
-  Uint32 = LibPcdGetEx32 (&Guid1, tn);\r
-  \r
-  LibPcdCallBackOnSet (&Guid1, tn, OnsetCallback1);\r
-  \r
-  LibPcdCancelCallBackOnSet (&Guid1, tn, OnsetCallback1);\r
-  \r
-  for (i = 0; i < 2; i++) {\r
-    Uint32a = LibPcdSetEx32 (&Guid1, tn, Uint32 + i);\r
-    DebugPrint (0x80000000, "%x\n", Uint32a);\r
-  }\r
-  \r
-  \r
-  \r
-  Uint32 = LibPcdGet32 (tn);\r
+  UINT8     u8;\r
+  UINT16    u16;\r
+  UINT32    u32;\r
+  UINT64    u64;\r
   \r
+  u32 = 0xafafafaf;\r
+  PcdSet32(PcdTestDynamicUint32, u32);\r
+\r
+  u64 = 0xafafafaf00000000;\r
+  PcdSet64(PcdTestDynamicUint64, u64);\r
+\r
+  u8 = PcdGet8(PcdTestDynamicUint8);\r
+  u16 = PcdGet16(PcdTestDynamicUint16);\r
+\r
+\r
+  ASSERT (u8 == 0x01);\r
+  ASSERT (u16 == 0x1234);\r
+  ASSERT (u64 == PcdGet64(PcdTestDynamicUint64));\r
+  ASSERT (u32 == PcdGet32(PcdTestDynamicUint32));\r
   \r
   return;\r
 }\r