From e06bcab62b36c8a12d5a707c111b0b6f7b77fe38 Mon Sep 17 00:00:00 2001 From: swiftlyfalling Date: Thu, 2 Jun 2016 18:01:13 -0400 Subject: [PATCH] Increase test coverage of Row+Foundation.swift Add missing test to verify initialization failure if NSDictionary has invalid (non-String) keys. --- Tests/Public/Foundation/Row+FoundationTests.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tests/Public/Foundation/Row+FoundationTests.swift b/Tests/Public/Foundation/Row+FoundationTests.swift index 19539af8b..ad1bec902 100644 --- a/Tests/Public/Foundation/Row+FoundationTests.swift +++ b/Tests/Public/Foundation/Row+FoundationTests.swift @@ -13,6 +13,10 @@ class RowFoundationTests: GRDBTestCase { let dictionary: NSDictionary = ["a": NSObject()] let row = Row(dictionary) XCTAssertTrue(row == nil) + + let dictionaryInvalidKeyType: NSDictionary = [NSNumber(integer: 1): "bar"] + let row2 = Row(dictionaryInvalidKeyType) + XCTAssertTrue(row2 == nil) } func testRowFromNSDictionary() {