Files
swift-mirror/test/SourceKit/CompileNotifications/cursor-info.swift
Alex Hoppen fcc5d98f1c [CursorInfo] Deliver results from solver-based cursor info
Running the SourceKit stress tester with verification of solver-based cursor info returned quite a few differences but in all of them, the old AST-based implementation was actually incorrect. So, instead of verifying  the results, deliver the results from solver-baesd cursor info and only fall back to AST-based cursor info if the solver-based implementation returned no results.

rdar://103369449
2023-02-07 14:53:54 +01:00

24 lines
1.2 KiB
Swift

// RUN: %sourcekitd-test -req=track-compiles == -req=cursor %s -offset=0 -- %s | %FileCheck %s -check-prefix=COMPILE_1 --enable-yaml-compatibility
// COMPILE_1: <empty cursor info; internal diagnostic: "Unable to resolve cursor info.">
// COMPILE_1: {
// COMPILE_1: key.notification: source.notification.compile-will-start,
// COMPILE_1: key.filepath: "SOURCE_DIR{{.*}}cursor-info.swift",
// COMPILE_1: key.compileid: [[CID1:".*"]]
// COMPILE_1: }
// COMPILE_1: {
// COMPILE_1: key.notification: source.notification.compile-did-finish,
// COMPILE_1: key.compileid: [[CID1]]
// COMPILE_1: }
// FIXME: Once all cursor info kinds are migrated to solver-based and we remove the fallback path to AST-based cursor info, we should only receive a single compile notification
// COMPILE_1: {
// COMPILE_1: key.notification: source.notification.compile-will-start,
// COMPILE_1: key.filepath: "SOURCE_DIR{{.*}}cursor-info.swift",
// COMPILE_1: key.compileid: [[CID2:".*"]]
// COMPILE_1: }
// COMPILE_1: {
// COMPILE_1: key.notification: source.notification.compile-did-finish,
// COMPILE_1: key.compileid: [[CID2]]
// COMPILE_1: }
// COMPILE_1-NOT: compile-will-start
// COMPILE_1-NOT: compile-did-finish