Fix P1 test build break (#16631)
authorJan Kotas <jkotas@microsoft.com>
Tue, 27 Feb 2018 20:08:59 +0000 (12:08 -0800)
committerGitHub <noreply@github.com>
Tue, 27 Feb 2018 20:08:59 +0000 (12:08 -0800)
tests/src/Common/CoreCLRTestLibrary/Utilities.cs

index 72826f3..a9beaa9 100644 (file)
@@ -89,6 +89,18 @@ namespace TestLibrary
             return sb.ToString();
         }
 
+        public static bool CompareBytes(byte[] arr1, byte[] arr2)
+        {
+            if (arr1 == null) return (arr2 == null);
+            if (arr2 == null) return false;
+
+            if (arr1.Length != arr2.Length) return false;
+
+            for (int i = 0; i < arr1.Length; i++) if (arr1[i] != arr2[i]) return false;
+
+            return true;
+        }
+
         // Given a string, display the unicode characters in hex format, optionally displaying each 
         // characters unicode category
         public static string FormatHexStringFromUnicodeString(string string1, bool includeUnicodeCategory)