Files
swift-mirror/test/SourceKit/CodeFormat/indent-comment.swift
Argyrios Kyrtzidis 8ff6a98a99 [sourcekit] Merge SourceKit into the Swift repo.
The code goes into its own sub-tree under 'tools' but tests go under 'test',
so that running 'check-swift' will also run all the SourceKit tests.

SourceKit is disabled on non-darwin platforms.
2015-11-05 01:09:08 -08:00

40 lines
1.2 KiB
Swift

/**
* Foo Comment
*/
class Foo {
/**
* Bar Comment
*/
func Bar() {}
}
/*
*
class Foo {}
*/
// RUN: %sourcekitd-test -req=format -line=1 -length=1 %s >%t.response
// RUN: %sourcekitd-test -req=format -line=2 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=3 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=5 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=6 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=7 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=11 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=12 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=38 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=39 -length=1 %s >>%t.response
// RUN: FileCheck --strict-whitespace %s <%t.response
// CHECK: key.sourcetext: "/**"
// CHECK: key.sourcetext: " * Foo Comment"
// CHECK: key.sourcetext: " */"
// CHECK: key.sourcetext: " /**"
// CHECK: key.sourcetext: " * Bar Comment"
// CHECK: key.sourcetext: " */"
// CHECK: key.sourcetext: " *"
// CHECK: key.sourcetext: " class Foo {}"
// CHECK: key.sourcetext: " *"
// CHECK: key.sourcetext: " func foo2() {}"
/*
*
func foo2() {}