Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ struct AnimationCompletionUITests {
}
}
}
// When run seperately, precision: 1.0 works fine
// but in the full suite, it will hit the same issue of #340
withKnownIssue("#690", isIntermittent: true) {
openSwiftUIAssertAnimationSnapshot(
of: ContentView()
)
}
Comment on lines -48 to -54
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR still does not fix the issue. I know we can pass the case by setting precision. But that was not what we want.

openSwiftUIAssertAnimationSnapshot(
of: ContentView(),
precision: 0.995,
perceptualPrecision: 0.995
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,10 @@ struct BezierAnimationUITests {
}
}
}
// When run seperately, precision: 1.0 works fine
// but in the full suite, it will hit the same issue of #340
withKnownIssue("$690", isIntermittent: true) {
openSwiftUIAssertAnimationSnapshot(
of: ContentView(),
)
}
openSwiftUIAssertAnimationSnapshot(
of: ContentView(),
precision: 0.995,
perceptualPrecision: 0.995
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ struct RepeatAnimationUITests {
}
}
}
withKnownIssue("#690", isIntermittent: true) {
openSwiftUIAssertAnimationSnapshot(
of: ContentView(autoreverses: autoreverses),
testName: #function + "\(autoreverses)"
)
}
openSwiftUIAssertAnimationSnapshot(
of: ContentView(autoreverses: autoreverses),
precision: 0.995,
perceptualPrecision: 0.995,
testName: #function + "\(autoreverses)"
)
}
}
8 changes: 5 additions & 3 deletions Example/OpenSwiftUIUITests/Graphic/Color/ColorUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ struct ColorUITests {
}
}
}
withKnownIssue("#690", isIntermittent: true) {
openSwiftUIAssertAnimationSnapshot(of: ContentView())
}
openSwiftUIAssertAnimationSnapshot(
of: ContentView(),
precision: 0.995,
perceptualPrecision: 0.995
)
}

// FIXME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ struct ForEachUITests {
openSwiftUIAssertSnapshot(of: ContentView())
}

@Test
@Test(
.bug(
"https://github.com/OpenSwiftUIProject/OpenSwiftUI/issues/632",
id: 632
)
)
func insertAnimation() {
struct ContentView: AnimationTestView {
nonisolated static var model: AnimationTestModel {
Expand All @@ -60,9 +65,8 @@ struct ForEachUITests {
}
}
}
withKnownIssue("#632") {
Issue.record("AttributeGraph precondition failure: accessing attribute in a different namespace: 36376.")
// openSwiftUIAssertAnimationSnapshot(of: ContentView())
withKnownIssue("#632", isIntermittent: true) {
openSwiftUIAssertAnimationSnapshot(of: ContentView())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ private class ForEachState<Data, ID, Content> where Data: RandomAccessCollection
if item.isRemoved {
foundActiveItem = false
} else {
newEdits = edits
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only change in this PR. But I do not agree on this change.

Also it seems it does not solve the AG namespace issue. You need to construct case and reproduce the crash locally. And then provide your fix solution.

newEdits.removeValue(forKey: id)
foundActiveItem = true
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion Sources/OpenSwiftUI_SPI/Shims/kdebug/kdebug_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ __OSX_AVAILABLE(10.10) __IOS_AVAILABLE(8.2);
*
* @return
* 0 if tracing is disabled or `debugid` is being filtered out of trace.
* It can also return (int64_t)-1 if an error occured. Otherwise,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Respect the original kdebug doc from SDK.

* It can also return (int64_t)-1 if an error occurred. Otherwise,
* it returns the ID to use to refer to the string in future
* kdebug_trace(2) calls.
*
Expand Down