diff options
Diffstat (limited to 'test')
3 files changed, 208 insertions, 0 deletions
diff --git a/test/files/presentation/scope-completion-import.check b/test/files/presentation/scope-completion-import.check new file mode 100644 index 0000000000..1d84abd617 --- /dev/null +++ b/test/files/presentation/scope-completion-import.check @@ -0,0 +1,141 @@ +reload: Completions.scala + +askScopeCompletion at Completions.scala(15,4) +================================================================================ +[response] askScopeCompletion at (15,4) +retrieved 10 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo()test.Foo` +[accessible: true] `method fCCC=> Int` +[accessible: true] `method fOOO=> Int` +[accessible: true] `object Otest.O.type` +[accessible: true] `value otest.O.type` +================================================================================ + +askScopeCompletion at Completions.scala(19,4) +================================================================================ +[response] askScopeCompletion at (19,4) +retrieved 9 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo()test.Foo` +[accessible: true] `method fCCC=> Int` +[accessible: true] `method fOOO=> Int` +[accessible: true] `object Otest.O.type` +================================================================================ + +askScopeCompletion at Completions.scala(24,4) +================================================================================ +[response] askScopeCompletion at (24,4) +retrieved 9 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo()test.Foo` +[accessible: true] `method fCCC=> Int` +[accessible: true] `object Otest.O.type` +[accessible: true] `value ctest.C` +================================================================================ + +askScopeCompletion at Completions.scala(27,5) +================================================================================ +[response] askScopeCompletion at (27,5) +retrieved 8 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo()test.Foo` +[accessible: true] `object Otest.O.type` +[accessible: true] `value ctest.C` +================================================================================ + +askScopeCompletion at Completions.scala(30,5) +================================================================================ +[response] askScopeCompletion at (30,5) +retrieved 9 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo()test.Foo` +[accessible: true] `method fCCC=> Int` +[accessible: true] `object Otest.O.type` +[accessible: true] `value ctest.C` +================================================================================ + +askScopeCompletion at Completions.scala(32,5) +================================================================================ +[response] askScopeCompletion at (32,5) +retrieved 10 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo()test.Foo` +[accessible: true] `method fCCC=> Int` +[accessible: true] `method fOOO=> Int` +[accessible: true] `object Otest.O.type` +[accessible: true] `value ctest.C` +================================================================================ + +askScopeCompletion at Completions.scala(41,4) +================================================================================ +[response] askScopeCompletion at (41,4) +retrieved 10 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo_1()test.Foo_1` +[accessible: true] `method bar=> Unit` +[accessible: true] `method fCCC=> Int` +[accessible: true] `method fOOO=> Int` +[accessible: true] `object Otest.O.type` +================================================================================ + +askScopeCompletion at Completions.scala(51,4) +================================================================================ +[response] askScopeCompletion at (51,4) +retrieved 11 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo_2()test.Foo_2` +[accessible: true] `method bar=> Unit` +[accessible: true] `method fCCC=> Int` +[accessible: true] `method fOOO=> Int` +[accessible: true] `object Otest.O.type` +[accessible: true] `value otest.O.type` +================================================================================ + +askScopeCompletion at Completions.scala(61,4) +================================================================================ +[response] askScopeCompletion at (61,4) +retrieved 10 members +[accessible: true] `class Ctest.C` +[accessible: true] `class Foo_1test.Foo_1` +[accessible: true] `class Foo_2test.Foo_2` +[accessible: true] `class Foo_3test.Foo_3` +[accessible: true] `class Footest.Foo` +[accessible: true] `constructor Foo_3()test.Foo_3` +[accessible: true] `method bar=> Unit` +[accessible: true] `method fCCC=> Int` +[accessible: true] `object Otest.O.type` +[accessible: true] `value ctest.C` +================================================================================ diff --git a/test/files/presentation/scope-completion-import/Test.scala b/test/files/presentation/scope-completion-import/Test.scala new file mode 100644 index 0000000000..bec1131c4c --- /dev/null +++ b/test/files/presentation/scope-completion-import/Test.scala @@ -0,0 +1,3 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest
\ No newline at end of file diff --git a/test/files/presentation/scope-completion-import/src/Completions.scala b/test/files/presentation/scope-completion-import/src/Completions.scala new file mode 100644 index 0000000000..6e08321283 --- /dev/null +++ b/test/files/presentation/scope-completion-import/src/Completions.scala @@ -0,0 +1,64 @@ +package test + +class C { + def fCCC : Int = 0 +} + +object O extends C { + def fOOO : Int = 0 +} + +class Foo { + { + val o = O + import o._ + /*_*/ + } + { + import O._ + /*_*/ + } + { + val c = new C + import c._ + /*_*/ + } + { + f/*_*/ + val c = new C + import c._ + f/*_*/ + import O._ + f/*_*/ + } +} + +class Foo_1 { + + import O._ + + def bar { + /*_*/ + } +} + +class Foo_2 { + + val o = O + import o._ + + def bar { + /*_*/ + } +} + +class Foo_3 { + + val c = new C + import c._ + + def bar { + /*_*/ + } +} + |