From 7eff57142d19d17c769929b04116836570ed5f2b Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Tue, 27 Feb 2018 12:08:59 -0800 Subject: [PATCH] Fix P1 test build break (#16631) --- tests/src/Common/CoreCLRTestLibrary/Utilities.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/src/Common/CoreCLRTestLibrary/Utilities.cs b/tests/src/Common/CoreCLRTestLibrary/Utilities.cs index 72826f3..a9beaa9 100644 --- a/tests/src/Common/CoreCLRTestLibrary/Utilities.cs +++ b/tests/src/Common/CoreCLRTestLibrary/Utilities.cs @@ -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) -- 2.7.4