|
From: Rob M. <ro...@us...> - 2007-09-21 07:59:12
|
Update of /cvsroot/wix/wix/src/WixUnit In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19110/src/WixUnit Modified Files: CompareUnit.cs Log Message: AaronSte: Creating separate Votive and Sconce DLLs for VS 2005 and VS 2008. Adding the VS 2008 SDK source code that is needed to build the VS 2008 Votive and Sconce dlls. HeathS: SFBUG:1789825 - CreationTimeUTC documents wrong format SFFEATURE:1768845 - Patch element should support MinorUpdateTargetRTM attribute SFFEATURE:1735295 - Patch build should add PATCHNEW* properties to patch transform Added support for ignorables to CompareUnit in WixUnit HeathS: SFBUG:1768842 - PatchProperty does not allow Company RobMen: Ensure RegistryKey element never ends up as KeyPath because MSI SDK says it isn't allowed. RobMen: Component guid generation. RobMen: SFBUG:1795309 - respect the rollback flag for the last SQL string like all the other strings. RobMen: SFBUG:1787888 - correctly handle certificates that are in Components that are conditioned out. RobMen: SFBUG:1675194 - loop through all server bindings when searching for a match. Index: CompareUnit.cs =================================================================== RCS file: /cvsroot/wix/wix/src/WixUnit/CompareUnit.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CompareUnit.cs 27 Jun 2007 05:35:49 -0000 1.1 --- CompareUnit.cs 21 Sep 2007 07:58:33 -0000 1.2 *************** *** 265,270 **** break; case RowOperation.Modify: ! if (("_SummaryInformation" != table.Name || (9 != (int)row[0] && 12 != (int)row[0] && 13 != (int)row[0] && 18 != (int)row[0])) && ! ("Property" != table.Name || "ProductCode" != (string)row[0])) { string primaryKey = row.GetPrimaryKey('/'); --- 265,269 ---- break; case RowOperation.Modify: ! if (!Ignore(row)) { string primaryKey = row.GetPrimaryKey('/'); *************** *** 284,287 **** --- 283,325 ---- /// <summary> + /// Determines if the given row can be ignored when comparing results. + /// </summary> + /// <param name="row">The row to check.</param> + /// <returns>True if the row can be ignored; otherwise, false.</returns> + private static bool Ignore(Row row) + { + if ("_SummaryInformation" == row.Table.Name) + { + // check timestamp and version-dependent fields + switch ((int)row[0]) + { + case 9: + case 12: + case 13: + case 18: + return true; + } + } + else if ("Property" == row.Table.Name) + { + switch ((string)row[0]) + { + case "ProductCode": + return true; + } + } + else if ("MsiPatchMetadata" == row.Table.Name) + { + switch (row.GetPrimaryKey('/')) + { + case "/CreationTimeUTC": + return true; + } + } + + return false; + } + + /// <summary> /// Fix a failed test by replacing the expected file with the actual file /// </summary> |