Remove interpolated strings from benchmark CheckResults

This call was in many cases skewing the benchmark results.

Note: Intentionally staging this in without removing the old overload initially.
This commit is contained in:
Dave Abrahams
2017-05-04 15:30:56 -07:00
parent 0db10e9b60
commit e32fb8badb
63 changed files with 214 additions and 345 deletions

View File

@@ -122,8 +122,7 @@ public func run_Dictionary(scale: Int) {
Dict[word] = true
}
}
CheckResults(Dict.count == 270,
"IncorrectResults in DictTest: \(Dict.count) != 270.")
CheckResults(Dict.count == 270)
// Check performance of searching in the dictionary:
// Fill the dictionary with words from the first half of the text
@@ -142,8 +141,7 @@ public func run_Dictionary(scale: Int) {
}
}
}
CheckResults(count == N*541,
"IncorrectResults in DictTest: \(count) != \(N*541).")
CheckResults(count == N*541)
}
class Box<T : Hashable> : Hashable {
@@ -272,8 +270,7 @@ public func run_DictionaryOfObjects(scale: Int) {
Dict[Box(word)] = Box(true)
}
}
CheckResults(Dict.count == 270,
"IncorrectResults in DictTest: \(Dict.count) != 270.")
CheckResults(Dict.count == 270)
// Check performance of searching in the dictionary:
// Fill the dictionary with words from the first half of the text
@@ -292,6 +289,5 @@ public func run_DictionaryOfObjects(scale: Int) {
}
}
}
CheckResults(count == N*541,
"IncorrectResults in DictTestAllObjects: \(count) != \(N*541).")
CheckResults(count == N*541)
}