OLD | NEW |
1 function logError(error) | 1 function logError(error) |
2 { | 2 { |
3 debug("error is: " + error.toString()); | 3 debug("error is: " + error.toString()); |
4 } | 4 } |
5 | 5 |
6 // Verifies that the given "bytes" holds the same value as "expectedHexString". | 6 // Verifies that the given "bytes" holds the same value as "expectedHexString". |
7 // "bytes" can be anything recognized by "bytesToHexString()". | 7 // "bytes" can be anything recognized by "bytesToHexString()". |
8 function bytesShouldMatchHexString(testDescription, expectedHexString, bytes) | 8 function bytesShouldMatchHexString(testDescription, expectedHexString, bytes) |
9 { | 9 { |
10 expectedHexString = "[" + expectedHexString.toLowerCase() + "]"; | 10 expectedHexString = "[" + expectedHexString.toLowerCase() + "]"; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 debug("Serialized key bytes: " + bytesToHexString(serializedWithoutVersi
on)); | 117 debug("Serialized key bytes: " + bytesToHexString(serializedWithoutVersi
on)); |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 function shouldEvaluateAs(actual, expectedValue) | 121 function shouldEvaluateAs(actual, expectedValue) |
122 { | 122 { |
123 if (typeof expectedValue == "string") | 123 if (typeof expectedValue == "string") |
124 return shouldBeEqualToString(actual, expectedValue); | 124 return shouldBeEqualToString(actual, expectedValue); |
125 return shouldEvaluateTo(actual, expectedValue); | 125 return shouldEvaluateTo(actual, expectedValue); |
126 } | 126 } |
OLD | NEW |