Skip to content

Commit

Permalink
Fix indent levels that are out of place
Browse files Browse the repository at this point in the history
  • Loading branch information
jonreid committed Mar 21, 2018
1 parent 95c1e2e commit 344391c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Hamcrest/DictionaryMatchers.swift
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
public func hasEntry<K, V>(_ keyMatcher: Matcher<K>, _ valueMatcher: Matcher<V>) -> Matcher<Dictionary<K, V>> {
return Matcher("a dictionary containing [\(keyMatcher.description) -> \(valueMatcher.description)]") { (dictionary: Dictionary<K, V>) -> Bool in
for (key, value) in dictionary {
if keyMatcher.matches(key).boolValue && valueMatcher.matches(value).boolValue {
return true
}
return Matcher("a dictionary containing [\(keyMatcher.description) -> \(valueMatcher.description)]") { (dictionary: Dictionary<K, V>) -> Bool in
for (key, value) in dictionary {
if keyMatcher.matches(key).boolValue && valueMatcher.matches(value).boolValue {
return true
}
return false
}
return false
}
}

public func hasEntry<K, V: Equatable>(_ expectedKey: K, _ expectedValue: V) -> Matcher<Dictionary<K, V>> {
return hasEntry(equalToWithoutDescription(expectedKey), equalToWithoutDescription(expectedValue))
return hasEntry(equalToWithoutDescription(expectedKey), equalToWithoutDescription(expectedValue))
}

public func hasKey<K, V>(_ matcher: Matcher<K>) -> Matcher<Dictionary<K, V>> {
return hasEntry(matcher, anything())
}

public func hasKey<K, V>(_ expectedKey: K) -> Matcher<Dictionary<K, V>> {
return hasKey(equalToWithoutDescription(expectedKey))
return hasKey(equalToWithoutDescription(expectedKey))
}

public func hasValue<K, V>(_ matcher: Matcher<V>) -> Matcher<Dictionary<K, V>> {
Expand Down

0 comments on commit 344391c

Please sign in to comment.