Skip to content

Commit

Permalink
No EKObject in iOS test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vermeer, Edwin authored and Vermeer, Edwin committed Jun 6, 2017
1 parent 2565516 commit 594ec29
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SwiftErrorBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
scope = "0"
Expand All @@ -24,7 +24,7 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.IDETestFailureBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
breakpointStackSelectionBehavior = "1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class EVReflectionEventKitTests: XCTestCase {

//TODO: fix
// Needs a workaround. See http://stackoverflow.com/questions/43686690/mirror-of-ekevent-does-not-show-the-data
return
let exp = expectation(description: "eventStore")

store.requestAccess(to: .event, completion: { (granted, error) in
Expand Down
9 changes: 5 additions & 4 deletions UnitTests/EVReflectionTests/EVReflectionIssue202.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ class TestIssue202: XCTestCase {
func testIssue202() {
let json = "{\"chartConfigs\":{\"config_id\":\"651c3f71-3d44-11e7-b0b9-276d909080a8\",\"autorefresh\":false,\"background\":{\"0\":{\"background_color\":\"#feffea\",\"border_color\":\"#3264c8\",\"border_width\":2.0,\"inner_radius\":0.0,\"outer_radius\":0.0,\"shape\":\"\"}},\"chart_type\":\"Column and Bar Chart/Column with rotated labels\"}}"
let obj = ChartConfigPojo(json: json, forKeyPath: "chartConfigs")

XCTAssert(obj.background.count == 1, "Should have 1 background object")
let bg = obj.background["0"]
XCTAssertNotNil(bg, "Should have a background object")
XCTAssert(bg?.background_color ?? "" == "#feffea", "Should have #feffea background color")

print("obj = \(obj)")

//TODO: This will result in a memory error
//print("obj = \(obj)")

// Hmm... why do we get a:
//objc[26840]: UnitTestsOSX.BackgroundPOJO object 0x101322c90 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
Expand Down Expand Up @@ -66,7 +67,7 @@ class ChartConfigPojo : EVObject{
for (key,val) in dict {
if let val = val as? NSDictionary {
let pojo: BackgroundPOJO = BackgroundPOJO(dictionary: val)
bg["\(key)"] = pojo
bg[key as? String ?? ""] = pojo
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions UnitTests/UnitTests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
131200E41EB31EA800A189C8 /* EVReflectionExtendingNSObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F7903C91E7D4F750086D111 /* EVReflectionExtendingNSObjects.swift */; };
131200E51EB31EC400A189C8 /* EVReflectionCustomConverterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FA506E31E68C953003D83E7 /* EVReflectionCustomConverterTests.swift */; };
131200E61EB31EC400A189C8 /* EVReflectionCustomConverterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FA506E31E68C953003D83E7 /* EVReflectionCustomConverterTests.swift */; };
131200E81EB3B47000A189C8 /* EVReflectionEventKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131200E71EB3B47000A189C8 /* EVReflectionEventKitTests.swift */; };
131200E91EB3B47000A189C8 /* EVReflectionEventKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131200E71EB3B47000A189C8 /* EVReflectionEventKitTests.swift */; };
131200EA1EB3B47000A189C8 /* EVReflectionEventKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 131200E71EB3B47000A189C8 /* EVReflectionEventKitTests.swift */; };
131200EB1EB4B58300A189C8 /* EVReflectionIssueAF39.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FF953661E4A8237003B40A6 /* EVReflectionIssueAF39.swift */; };
Expand Down Expand Up @@ -973,7 +972,6 @@
7F41ECA51B91F2E0003A2236 /* TestObjects.swift in Sources */,
7F9E680C1C62396500F0F4D3 /* EVReflectionNestedObjectsTests.swift in Sources */,
7F41ECB31B91F306003A2236 /* EVReflectionWorkaroundSwiftGenericsTests.swift in Sources */,
131200E81EB3B47000A189C8 /* EVReflectionEventKitTests.swift in Sources */,
7F59F9D91C07986200C14CF9 /* EVReflectionAssociatedTests.swift in Sources */,
7F734AB71E53AE5E007A5688 /* EVReflectionIssue159.swift in Sources */,
7F479E1C1C84D7A000F03BEF /* EVReflectionSyncAlternateDesync.swift in Sources */,
Expand Down

0 comments on commit 594ec29

Please sign in to comment.