On 08/06/14 19:50, Kinney, Michael D wrote: > Laszlo, > > I do have a suggestion on the Validate() API. > > I recommend you add a Feature Flag PCD to enable/disable API > validation with the default value being FALSE, and the lib instance > can call the internal-only Validate() API after each operation from > within the lib instance itself in all locations you think a > validation is useful based on the Feature Flag PCD being enabled. > This way, when you need to do unit testing, you can enable this > Feature Flag PCD in the DSC file that builds the unit test, so > ASSERT() will be generated if validation fails during the unit test. > This avoids the need to provide Validate() as a public API in any lib > class.
Perfect :) I assume I should add this PCD to MdePkg.dec, to the end of the [PcdsFeatureFlag] section. Can you please suggest a name for it? "PcdOrderedCollectionLibValidate" seems reasonable to me. Also, the token 0x0000002a seems unoccupied, can I use that? ## If TRUE, OrderedCollectionLib is instructed to validate the # ORDERED_COLLECTION structure at the end of such operations # (typically structure modifications) that justify validation of the # structure for unit testing purposes. gEfiMdePkgTokenSpaceGuid.PcdOrderedCollectionLibValidate|FALSE|BOOLEAN|0x0000002a Does that look acceptable? Thanks! Laszlo ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel