diff options
Diffstat (limited to 'test/disabled')
4 files changed, 605 insertions, 0 deletions
diff --git a/test/disabled/presentation/simple-tests.check b/test/disabled/presentation/simple-tests.check new file mode 100644 index 0000000000..67d8ac7269 --- /dev/null +++ b/test/disabled/presentation/simple-tests.check @@ -0,0 +1,389 @@ +reload: Tester.scala +askTypeCompletion at Tester.scala(16,25) + +================================================================================ +[response] aksTypeCompletion at (16,25) +retreived 75 members +TypeMember(method !=,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method !=,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method ==,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method ==,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method >,(that: Tester.this.settings.Setting)Boolean,true,true,<none>) +TypeMember(method >=,(that: Tester.this.settings.Setting)Boolean,true,true,<none>) +TypeMember(method ##,()Int,true,true,<none>) +TypeMember(method <,(that: Tester.this.settings.Setting)Boolean,true,true,<none>) +TypeMember(method <=,(that: Tester.this.settings.Setting)Boolean,true,true,<none>) +TypeMember(method ->,[B](y: B)(Tester.this.settings.BooleanSetting, B),true,false,method any2ArrowAssoc) +TypeMember(method +,(other: String)java.lang.String,true,false,method any2stringadd) +TypeMember(method →,[B](y: B)(Tester.this.settings.BooleanSetting, B),true,false,method any2ArrowAssoc) +TypeMember(constructor BooleanSetting,(name: String,descr: String)Tester.this.settings.BooleanSetting,true,false,<none>) +TypeMember(constructor Object,()java.lang.Object,true,true,<none>) +TypeMember(constructor StringAdd,(self: Any)scala.runtime.StringAdd,true,false,method any2stringadd) +TypeMember(constructor ArrowAssoc,(x: Tester.this.settings.BooleanSetting)ArrowAssoc[Tester.this.settings.BooleanSetting],true,false,method any2ArrowAssoc) +TypeMember(type T,Tester.this.settings.verbose.T,true,false,<none>) +TypeMember(variable _abbreviations,List[String],false,true,<none>) +TypeMember(variable _helpSyntax,String,false,true,<none>) +TypeMember(variable _postSetHook,(Tester.this.settings.verbose.type) => Unit,false,true,<none>) +TypeMember(method abbreviations,=> List[String],true,true,<none>) +TypeMember(method asInstanceOf,[T0]=> T0,true,true,<none>) +TypeMember(method choices,=> List[String],true,true,<none>) +TypeMember(method clone,()java.lang.Object,false,true,<none>) +TypeMember(method compare,(that: Tester.this.settings.Setting)Int,true,true,<none>) +TypeMember(method compareTo,(that: Tester.this.settings.Setting)Int,true,true,<none>) +TypeMember(method dependencies,=> List[(Tester.this.settings.Setting, String)],true,true,<none>) +TypeMember(variable dependency,Option[(Tester.this.settings.Setting, String)],false,true,<none>) +TypeMember(method dependsOn,(s: Tester.this.settings.Setting,value: String)Tester.this.settings.verbose.type,true,true,<none>) +TypeMember(value descr,String,false,false,<none>) +TypeMember(method ensuring,(cond: (Tester.this.settings.BooleanSetting) => Boolean,msg: => Any)Tester.this.settings.BooleanSetting,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: (Tester.this.settings.BooleanSetting) => Boolean)Tester.this.settings.BooleanSetting,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: Boolean,msg: => Any)Tester.this.settings.BooleanSetting,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: Boolean)Tester.this.settings.BooleanSetting,true,false,method any2Ensuring) +TypeMember(method eq,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method equals,(that: Any)Boolean,true,true,<none>) +TypeMember(method errorAndValue,[T](msg: String,x: T)T,true,true,<none>) +TypeMember(method finalize,()Unit,false,true,<none>) +TypeMember(method formatted,(fmtstr: String)String,true,false,method any2stringadd) +TypeMember(method hashCode,()Int,true,true,<none>) +TypeMember(value helpDescription,String,false,true,<none>) +TypeMember(method helpSyntax,=> String,true,true,<none>) +TypeMember(method isAdvanced,=> Boolean,true,true,<none>) +TypeMember(method isDefault,=> Boolean,true,true,<none>) +TypeMember(method isForDebug,=> Boolean,true,true,<none>) +TypeMember(method isInstanceOf,[T0]=> Boolean,true,true,<none>) +TypeMember(method isInternalOnly,=> Boolean,true,true,<none>) +TypeMember(method isPrivate,=> Boolean,true,true,<none>) +TypeMember(method isStandard,=> Boolean,true,true,<none>) +TypeMember(value name,String,false,false,<none>) +TypeMember(method ne,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method notify,()Unit,true,true,<none>) +TypeMember(method notifyAll,()Unit,true,true,<none>) +TypeMember(method postSetHook,()Unit,true,true,<none>) +TypeMember(method respondsTo,(label: String)Boolean,true,true,<none>) +TypeMember(value self,Any,false,false,method any2stringadd) +TypeMember(variable setByUser,Boolean,false,true,<none>) +TypeMember(method synchronized,[T0](x$1: T0)T0,true,true,<none>) +TypeMember(method toString,()String,true,true,<none>) +TypeMember(method tryToSet,(args: List[String])Some[List[String]],true,false,<none>) +TypeMember(method tryToSetColon,(args: List[String])Option[Tester.this.settings.ResultOfTryToSet],true,true,<none>) +TypeMember(method tryToSetFromPropertyValue,(s: String)Unit,true,false,<none>) +TypeMember(method tryToSetProperty,(args: List[String])Option[Tester.this.settings.ResultOfTryToSet],true,true,<none>) +TypeMember(method unparse,=> List[String],true,false,<none>) +TypeMember(variable v,Boolean,false,false,<none>) +TypeMember(method value,=> Tester.this.settings.verbose.T,true,true,<none>) +TypeMember(method value_=,(arg: Tester.this.settings.verbose.T)Unit,true,true,<none>) +TypeMember(method wait,()Unit,true,true,<none>) +TypeMember(method wait,(x$1: Long,x$2: Int)Unit,true,true,<none>) +TypeMember(method wait,(x$1: Long)Unit,true,true,<none>) +TypeMember(method withAbbreviation,(s: String)Tester.this.settings.verbose.type,true,true,<none>) +TypeMember(method withHelpSyntax,(s: String)Tester.this.settings.verbose.type,true,true,<none>) +TypeMember(method withPostSetHook,(f: (Tester.this.settings.verbose.type) => Unit)Tester.this.settings.verbose.type,true,true,<none>) +TypeMember(value x,Tester.this.settings.BooleanSetting,false,false,method any2ArrowAssoc) +askTypeCompletion at Tester.scala(23,24) + +================================================================================ +[response] aksTypeCompletion at (23,24) +retreived 46 members +TypeMember(method !=,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method !=,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method ==,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method ==,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method ##,()Int,true,true,<none>) +TypeMember(method ->,[B](y: B)(scala.tools.nsc.interactive.Response[U], B),true,false,method any2ArrowAssoc) +TypeMember(method +,(other: String)java.lang.String,true,false,method any2stringadd) +TypeMember(method →,[B](y: B)(scala.tools.nsc.interactive.Response[U], B),true,false,method any2ArrowAssoc) +TypeMember(constructor Response,()scala.tools.nsc.interactive.Response[U],true,false,<none>) +TypeMember(constructor StringAdd,(self: Any)scala.runtime.StringAdd,true,false,method any2stringadd) +TypeMember(constructor ArrowAssoc,(x: scala.tools.nsc.interactive.Response[U])ArrowAssoc[scala.tools.nsc.interactive.Response[U]],true,false,method any2ArrowAssoc) +TypeMember(method asInstanceOf,[T0]=> T0,true,true,<none>) +TypeMember(method cancel,()Unit,true,false,<none>) +TypeMember(variable cancelled,Boolean,false,false,<none>) +TypeMember(method clear,()Unit,true,false,<none>) +TypeMember(method clone,()java.lang.Object,false,true,<none>) +TypeMember(variable complete,Boolean,false,false,<none>) +TypeMember(variable data,Option[Either[U,Throwable]],false,false,<none>) +TypeMember(method ensuring,(cond: (scala.tools.nsc.interactive.Response[U]) => Boolean,msg: => Any)scala.tools.nsc.interactive.Response[U],true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: (scala.tools.nsc.interactive.Response[U]) => Boolean)scala.tools.nsc.interactive.Response[U],true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: Boolean,msg: => Any)scala.tools.nsc.interactive.Response[U],true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: Boolean)scala.tools.nsc.interactive.Response[U],true,false,method any2Ensuring) +TypeMember(method eq,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method equals,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method finalize,()Unit,false,true,<none>) +TypeMember(method formatted,(fmtstr: String)String,true,false,method any2stringadd) +TypeMember(method get,(timeout: Long)Option[Either[U,Throwable]],true,false,<none>) +TypeMember(method get,=> Either[U,Throwable],true,false,<none>) +TypeMember(method hashCode,()Int,true,true,<none>) +TypeMember(method isCancelled,=> Boolean,true,false,<none>) +TypeMember(method isComplete,=> Boolean,true,false,<none>) +TypeMember(method isInstanceOf,[T0]=> Boolean,true,true,<none>) +TypeMember(method ne,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method notify,()Unit,true,true,<none>) +TypeMember(method notifyAll,()Unit,true,true,<none>) +TypeMember(method raise,(exc: Throwable)Unit,true,false,<none>) +TypeMember(value self,Any,false,false,method any2stringadd) +TypeMember(method set,(x: U)Unit,true,false,<none>) +TypeMember(method setProvisionally,(x: U)Unit,true,false,<none>) +TypeMember(method synchronized,[T0](x$1: T0)T0,true,true,<none>) +TypeMember(method toString,()java.lang.String,true,true,<none>) +TypeMember(method wait,()Unit,true,true,<none>) +TypeMember(method wait,(x$1: Long,x$2: Int)Unit,true,true,<none>) +TypeMember(method wait,(x$1: Long)Unit,true,true,<none>) +TypeMember(value x,scala.tools.nsc.interactive.Response[U],false,false,method any2ArrowAssoc) +askTypeCompletion at Tester.scala(27,23) + +================================================================================ +[response] aksTypeCompletion at (27,23) +retreived 195 members +TypeMember(method !=,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method !=,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method ==,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method ==,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method ##,()Int,true,true,<none>) +TypeMember(method ->,[B](y: B)(scala.tools.nsc.Settings, B),true,false,method any2ArrowAssoc) +TypeMember(method +,(other: String)java.lang.String,true,false,method any2stringadd) +TypeMember(method →,[B](y: B)(scala.tools.nsc.Settings, B),true,false,method any2ArrowAssoc) +TypeMember(constructor Settings,()scala.tools.nsc.Settings,true,false,<none>) +TypeMember(constructor Settings,(errorFn: (String) => Unit)scala.tools.nsc.Settings,true,false,<none>) +TypeMember(constructor StringAdd,(self: Any)scala.runtime.StringAdd,true,false,method any2stringadd) +TypeMember(constructor ArrowAssoc,(x: scala.tools.nsc.Settings)ArrowAssoc[scala.tools.nsc.Settings],true,false,method any2ArrowAssoc) +TypeMember(trait AbsSetting,Tester.this.settings.AbsSetting,true,true,<none>) +TypeMember(trait AbsSettingValue,Tester.this.settings.AbsSettingValue,true,true,<none>) +TypeMember(class BooleanSetting,Tester.this.settings.BooleanSetting,true,true,<none>) +TypeMember(method BooleanSetting,(name: String,descr: String)Tester.this.settings.BooleanSetting,true,true,<none>) +TypeMember(class ChoiceSetting,Tester.this.settings.ChoiceSetting,true,true,<none>) +TypeMember(method ChoiceSetting,(name: String,helpArg: String,descr: String,choices: List[String],default: String)Tester.this.settings.ChoiceSetting,true,true,<none>) +TypeMember(class IntSetting,Tester.this.settings.IntSetting,true,true,<none>) +TypeMember(method IntSetting,(name: String,descr: String,default: Int,range: Option[(Int, Int)],parser: (String) => Option[Int])Tester.this.settings.IntSetting,true,true,<none>) +TypeMember(trait InternalSetting,Tester.this.settings.InternalSetting,true,true,<none>) +TypeMember(class MultiStringSetting,Tester.this.settings.MultiStringSetting,true,true,<none>) +TypeMember(method MultiStringSetting,(name: String,arg: String,descr: String)Tester.this.settings.MultiStringSetting,true,true,<none>) +TypeMember(class OutputDirs,Tester.this.settings.OutputDirs,true,true,<none>) +TypeMember(class OutputSetting,Tester.this.settings.OutputSetting,true,true,<none>) +TypeMember(method OutputSetting,(outputDirs: Tester.this.settings.OutputDirs,default: String)Tester.this.settings.OutputSetting,true,true,<none>) +TypeMember(class PathSetting,Tester.this.settings.PathSetting,true,true,<none>) +TypeMember(method PathSetting,(name: String,descr: String,default: String)Tester.this.settings.PathSetting,true,true,<none>) +TypeMember(class PhasesSetting,Tester.this.settings.PhasesSetting,true,true,<none>) +TypeMember(method PhasesSetting,(name: String,descr: String)Tester.this.settings.PhasesSetting,true,true,<none>) +TypeMember(type ResultOfTryToSet,Tester.this.settings.ResultOfTryToSet,true,true,<none>) +TypeMember(class Setting,Tester.this.settings.Setting,true,true,<none>) +TypeMember(class SettingGroup,Tester.this.settings.SettingGroup,true,true,<none>) +TypeMember(lazy value SettingOrdering,Ordering[Tester.this.settings.Setting],false,true,<none>) +TypeMember(trait SettingValue,Tester.this.settings.SettingValue,true,true,<none>) +TypeMember(method StringSetting,(name: String,arg: String,descr: String,default: String)Tester.this.settings.StringSetting,true,true,<none>) +TypeMember(class StringSetting,Tester.this.settings.StringSetting,true,true,<none>) +TypeMember(method XO,=> Tester.this.settings.BooleanSetting,true,true,<none>) +TypeMember(value Xchecknull,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xcloselim,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xdce,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xexperimental,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xhelp,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xlinearizer,Tester.this.settings.ChoiceSetting,false,true,<none>) +TypeMember(value XlogImplicits,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xmigration28,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xnojline,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xprint,Tester.this.settings.PhasesSetting,false,true,<none>) +TypeMember(value Xprintpos,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xshowcls,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value Xshowobj,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value Xshowtrees,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xwarnfatal,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Xwarninit,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ybuilderdebug,Tester.this.settings.ChoiceSetting,false,true,<none>) +TypeMember(value Ybuildmanagerdebug,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ycompacttrees,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ycompletion,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value YdepMethTpes,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Yhelp,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Yidedebug,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ylogcp,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value YmethodInfer,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ynogenericsig,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ynosqueeze,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ynotnull,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ypmatdebug,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ypmatnaive,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value YpresentationDebug,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value YpresentationDelay,Tester.this.settings.IntSetting,false,true,<none>) +TypeMember(value YpresentationLog,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value YpresentationReplay,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value YpresentationVerbose,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Yprofile,Tester.this.settings.PhasesSetting,false,true,<none>) +TypeMember(value YprofileClass,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value YprofileMem,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Yrangepos,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Yrecursion,Tester.this.settings.IntSetting,false,true,<none>) +TypeMember(value Yrepldebug,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value YrichExes,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Yshow,Tester.this.settings.PhasesSetting,false,true,<none>) +TypeMember(value Yshowsyms,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ystatistics,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value Ytyperdebug,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value YvirtClasses,Boolean,false,true,<none>) +TypeMember(value Ywarndeadcode,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method add,[T <: Tester.this.settings.Setting](s: T)T,false,true,<none>) +TypeMember(lazy value allSettings,scala.collection.mutable.HashSet[Tester.this.settings.Setting],false,true,<none>) +TypeMember(value argfiles,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method asInstanceOf,[T0]=> T0,true,true,<none>) +TypeMember(value assemextdirs,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value assemname,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value assemrefs,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value bootclasspath,Tester.this.settings.PathSetting,false,true,<none>) +TypeMember(value browse,Tester.this.settings.PhasesSetting,false,true,<none>) +TypeMember(value check,Tester.this.settings.PhasesSetting,false,true,<none>) +TypeMember(method checkDependencies,=> Boolean,true,true,<none>) +TypeMember(value checkInit,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value classpath,Tester.this.settings.PathSetting,false,true,<none>) +TypeMember(method clone,()java.lang.Object,false,true,<none>) +TypeMember(method copy,()scala.tools.nsc.Settings,true,true,<none>) +TypeMember(value d,Tester.this.settings.OutputSetting,false,true,<none>) +TypeMember(value debug,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method debuginfo,=> Tester.this.settings.ChoiceSetting,true,true,<none>) +TypeMember(method dependenciesFile,=> Tester.this.settings.StringSetting,true,true,<none>) +TypeMember(value dependencyfile,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value deprecation,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method disable,(s: Tester.this.settings.Setting)scala.collection.mutable.HashSet[Tester.this.settings.Setting],true,true,<none>) +TypeMember(value disable,Tester.this.settings.MultiStringSetting,false,true,<none>) +TypeMember(value elidebelow,Tester.this.settings.IntSetting,false,true,<none>) +TypeMember(method embeddedDefaults,(loader: java.lang.ClassLoader)Unit,true,true,<none>) +TypeMember(method embeddedDefaults,[T](implicit evidence$1: Manifest[T])Unit,true,true,<none>) +TypeMember(value encoding,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(method ensuring,(cond: (scala.tools.nsc.Settings) => Boolean,msg: => Any)scala.tools.nsc.Settings,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: (scala.tools.nsc.Settings) => Boolean)scala.tools.nsc.Settings,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: Boolean,msg: => Any)scala.tools.nsc.Settings,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: Boolean)scala.tools.nsc.Settings,true,false,method any2Ensuring) +TypeMember(method eq,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method equals,(that: Any)Boolean,true,true,<none>) +TypeMember(value errorFn,(String) => Unit,false,false,<none>) +TypeMember(value explaintypes,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(variable explicitParentLoader,Option[java.lang.ClassLoader],false,true,<none>) +TypeMember(value extdirs,Tester.this.settings.PathSetting,false,true,<none>) +TypeMember(method finalize,()Unit,false,true,<none>) +TypeMember(method formatted,(fmtstr: String)String,true,false,method any2stringadd) +TypeMember(value future,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value g,Tester.this.settings.ChoiceSetting,false,true,<none>) +TypeMember(value genPhaseGraph,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(method getClasspath,(id: String,loader: java.lang.ClassLoader)Option[String],false,true,<none>) +TypeMember(method hashCode,()Int,true,true,<none>) +TypeMember(value help,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value inline,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method isInstanceOf,[T0]=> Boolean,true,true,<none>) +TypeMember(value javabootclasspath,Tester.this.settings.PathSetting,false,true,<none>) +TypeMember(value javaextdirs,Tester.this.settings.PathSetting,false,true,<none>) +TypeMember(value log,Tester.this.settings.PhasesSetting,false,true,<none>) +TypeMember(method lookupSetting,(cmd: String)Option[Tester.this.settings.Setting],true,true,<none>) +TypeMember(value make,Tester.this.settings.ChoiceSetting,false,true,<none>) +TypeMember(method ne,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(value noCompletion,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value noForwarders,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value noSelfCheck,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value noassertions,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value noimports,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value nospecialization,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method notify,()Unit,true,true,<none>) +TypeMember(method notifyAll,()Unit,true,true,<none>) +TypeMember(value nouescape,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value nowarn,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method nowarnings,=> Tester.this.settings.BooleanSetting,true,true,<none>) +TypeMember(value optimise,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method outdir,=> Tester.this.settings.OutputSetting,true,true,<none>) +TypeMember(lazy value outputDirs,Tester.this.settings.OutputDirs,false,true,<none>) +TypeMember(method parseParams,(args: List[String])List[String],false,true,<none>) +TypeMember(value plugin,Tester.this.settings.MultiStringSetting,false,true,<none>) +TypeMember(value pluginOptions,Tester.this.settings.MultiStringSetting,false,true,<none>) +TypeMember(value pluginsDir,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value print,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method printLate,=> Tester.this.settings.BooleanSetting,true,true,<none>) +TypeMember(value printtypes,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method processArgumentString,(params: String)(Boolean, List[String]),true,true,<none>) +TypeMember(method processArguments,(arguments: List[String],processAll: Boolean)(Boolean, List[String]),true,true,<none>) +TypeMember(value prompt,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method recreateArgs,=> List[String],true,true,<none>) +TypeMember(value refinementMethodDispatch,Tester.this.settings.ChoiceSetting,false,true,<none>) +TypeMember(value require,Tester.this.settings.MultiStringSetting,false,true,<none>) +TypeMember(value resident,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value script,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value self,Any,false,false,method any2stringadd) +TypeMember(value selfInAnnots,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value showPhases,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value showPlugins,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value skip,Tester.this.settings.PhasesSetting,false,true,<none>) +TypeMember(value sourceReader,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value sourcedir,Tester.this.settings.StringSetting,false,true,<none>) +TypeMember(value sourcepath,Tester.this.settings.PathSetting,false,true,<none>) +TypeMember(method splitParams,(line: String)List[String],true,true,<none>) +TypeMember(value stop,Tester.this.settings.PhasesSetting,false,true,<none>) +TypeMember(method synchronized,[T0](x$1: T0)T0,true,true,<none>) +TypeMember(value target,Tester.this.settings.ChoiceSetting,false,true,<none>) +TypeMember(method toConciseString,=> String,true,true,<none>) +TypeMember(method toString,()String,true,true,<none>) +TypeMember(value unchecked,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value uniqid,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value usejavacp,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method userSetSettings,=> scala.collection.Set[Tester.this.settings.Setting],true,true,<none>) +TypeMember(value verbose,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value version,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(method visibleSettings,=> scala.collection.Set[Tester.this.settings.Setting],true,true,<none>) +TypeMember(method wait,()Unit,true,true,<none>) +TypeMember(method wait,(x$1: Long,x$2: Int)Unit,true,true,<none>) +TypeMember(method wait,(x$1: Long)Unit,true,true,<none>) +TypeMember(value writeICode,Tester.this.settings.BooleanSetting,false,true,<none>) +TypeMember(value x,scala.tools.nsc.Settings,false,false,method any2ArrowAssoc) +askTypeCompletion at Tester.scala(105,29) + +================================================================================ +[response] aksTypeCompletion at (105,29) +retreived 50 members +TypeMember(method !=,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method !=,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method ==,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method ==,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method ##,()Int,true,true,<none>) +TypeMember(method ->,[B](y: B)(scala.tools.nsc.util.SourceFile, B),true,false,method any2ArrowAssoc) +TypeMember(method +,(other: String)java.lang.String,true,false,method any2stringadd) +TypeMember(method →,[B](y: B)(scala.tools.nsc.util.SourceFile, B),true,false,method any2ArrowAssoc) +TypeMember(constructor SourceFile,()scala.tools.nsc.util.SourceFile,true,false,<none>) +TypeMember(constructor StringAdd,(self: Any)scala.runtime.StringAdd,true,false,method any2stringadd) +TypeMember(constructor ArrowAssoc,(x: scala.tools.nsc.util.SourceFile)ArrowAssoc[scala.tools.nsc.util.SourceFile],true,false,method any2ArrowAssoc) +TypeMember(method asInstanceOf,[T0]=> T0,true,true,<none>) +TypeMember(method beginsWith,(offset: Int,text: String)Boolean,true,false,<none>) +TypeMember(method clone,()java.lang.Object,false,true,<none>) +TypeMember(method content,=> Array[Char],true,false,<none>) +TypeMember(method dbg,(offset: Int)java.lang.String,true,false,<none>) +TypeMember(method ensuring,(cond: (scala.tools.nsc.util.SourceFile) => Boolean,msg: => Any)scala.tools.nsc.util.SourceFile,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: (scala.tools.nsc.util.SourceFile) => Boolean)scala.tools.nsc.util.SourceFile,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: Boolean,msg: => Any)scala.tools.nsc.util.SourceFile,true,false,method any2Ensuring) +TypeMember(method ensuring,(cond: Boolean)scala.tools.nsc.util.SourceFile,true,false,method any2Ensuring) +TypeMember(method eq,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method equals,(x$1: Any)Boolean,true,true,<none>) +TypeMember(method file,=> scala.tools.nsc.io.AbstractFile,true,false,<none>) +TypeMember(method finalize,()Unit,false,true,<none>) +TypeMember(method formatted,(fmtstr: String)String,true,false,method any2stringadd) +TypeMember(method hashCode,()Int,true,true,<none>) +TypeMember(method identifier,(pos: scala.tools.nsc.util.Position)Option[String],true,false,<none>) +TypeMember(method isInstanceOf,[T0]=> Boolean,true,true,<none>) +TypeMember(method isLineBreak,(idx: Int)Boolean,true,false,<none>) +TypeMember(method isSelfContained,=> Boolean,true,false,<none>) +TypeMember(method length,=> Int,true,false,<none>) +TypeMember(method lineToOffset,(index: Int)Int,true,false,<none>) +TypeMember(method lineToString,(index: Int)String,true,false,<none>) +TypeMember(method ne,(x$1: AnyRef)Boolean,true,true,<none>) +TypeMember(method notify,()Unit,true,true,<none>) +TypeMember(method notifyAll,()Unit,true,true,<none>) +TypeMember(method offsetToLine,(offset: Int)Int,true,false,<none>) +TypeMember(method path,=> String,true,false,<none>) +TypeMember(method position,(line: Int,column: Int)scala.tools.nsc.util.Position,true,false,<none>) +TypeMember(method position,(offset: Int)scala.tools.nsc.util.Position,true,false,<none>) +TypeMember(method positionInUltimateSource,(position: scala.tools.nsc.util.Position)scala.tools.nsc.util.Position,true,false,<none>) +TypeMember(value self,Any,false,false,method any2stringadd) +TypeMember(method skipWhitespace,(offset: Int)Int,true,false,<none>) +TypeMember(method synchronized,[T0](x$1: T0)T0,true,true,<none>) +TypeMember(method toString,()String,true,false,<none>) +TypeMember(method wait,()Unit,true,true,<none>) +TypeMember(method wait,(x$1: Long,x$2: Int)Unit,true,true,<none>) +TypeMember(method wait,(x$1: Long)Unit,true,true,<none>) +TypeMember(value x,scala.tools.nsc.util.SourceFile,false,false,method any2ArrowAssoc) +askTypeAt at Tester.scala(18,13) +[response] askTypeAt at (18,13) +val limit: Long = java.this.lang.System.currentTimeMillis().+(Tester.this.randomDelayMillis) +askTypeAt at Tester.scala(19,11) +[response] askTypeAt at (19,11) +val res: scala.tools.nsc.interactive.Response[U] = new scala.tools.nsc.interactive.Response[U]() diff --git a/test/disabled/presentation/simple-tests.javaopts b/test/disabled/presentation/simple-tests.javaopts new file mode 100644 index 0000000000..4af888f9c2 --- /dev/null +++ b/test/disabled/presentation/simple-tests.javaopts @@ -0,0 +1 @@ +-Dfile.encoding=UTF-8
\ No newline at end of file diff --git a/test/disabled/presentation/simple-tests/SimpleInteractiveTest.scala b/test/disabled/presentation/simple-tests/SimpleInteractiveTest.scala new file mode 100644 index 0000000000..014fd24b6f --- /dev/null +++ b/test/disabled/presentation/simple-tests/SimpleInteractiveTest.scala @@ -0,0 +1,11 @@ +import scala.tools.nsc.interactive.tests._ + +/** Simple test that shows how to use the InteractiveTest class. It uses the + * inherited runTest method that runs completion and typedAt tests on all + * sources found under src/ + */ +object Test extends InteractiveTest { + override val runRandomTests = false +// settings.YpresentationDebug.value = true +// override val synchronousRequests = false +} diff --git a/test/disabled/presentation/simple-tests/src/Tester.scala b/test/disabled/presentation/simple-tests/src/Tester.scala new file mode 100644 index 0000000000..cb62187514 --- /dev/null +++ b/test/disabled/presentation/simple-tests/src/Tester.scala @@ -0,0 +1,204 @@ +package scala.tools.nsc +package interactive +package tests + +import util._ +import reporters._ +import io.AbstractFile +import collection.mutable.ArrayBuffer + +class Tester(ntests: Int, inputs: Array[SourceFile], settings: Settings) { + + val reporter = new StoreReporter + val compiler = new Global(settings, reporter) + + def askAndListen[T, U](msg: String, arg: T, op: (T, Response[U]) => Unit) { + if (settings.verbose./*!*/value) print(msg+" "+arg+": ") + val TIMEOUT = 10 // ms + val limit/*?*/ = System.currentTimeMillis() + randomDelayMillis + val res/*?*/ = new Response[U] + op(arg, res) + while (!res.isComplete && !res.isCancelled) { + if (System.currentTimeMillis() > limit) { + print("c"); res./*!*/cancel() + } else res.get(TIMEOUT) match { + case Some(Left(t)) => + /**/ + if (settings./*!*/verbose.value) println(t) + case Some(Right(ex)) => + ex.printStackTrace() + println(ex) + case None => + } + } + } + + def askReload(sfs: SourceFile*) = askAndListen("reload", sfs.toList, compiler.askReload) + def askTypeAt(pos: Position) = askAndListen("type at", pos, compiler.askTypeAt) + def askTypeCompletion(pos: Position) = askAndListen("type at", pos, compiler.askTypeCompletion) + def askScopeCompletion(pos: Position) = askAndListen("type at", pos, compiler.askScopeCompletion) + + val rand = new java.util.Random() + + private def randomInverse(n: Int) = n / (rand.nextInt(n) + 1) + + private def randomDecreasing(n: Int) = { + var r = rand.nextInt((1 to n).sum) + var limit = n + var result = 0 + while (r > limit) { + result += 1 + r -= limit + limit -= 1 + } + result + } + + def randomSourceFileIdx() = rand.nextInt(inputs.length) + + def randomBatchesPerSourceFile(): Int = randomDecreasing(100) + + def randomChangesPerBatch(): Int = randomInverse(50) + + def randomPositionIn(sf: SourceFile) = rand.nextInt(sf.content.length) + + def randomNumChars() = randomInverse(100) + + def randomDelayMillis = randomInverse(10000) + + class Change(sfidx: Int, start: Int, nchars: Int, toLeft: Boolean) { + + private var pos = start + private var deleted: List[Char] = List() + + override def toString = + "In "+inputs(sfidx)+" at "+start+" take "+nchars+" to "+ + (if (toLeft) "left" else "right") + + def deleteOne() { + val sf = inputs(sfidx) + deleted = sf.content(pos) :: deleted + val sf1 = new BatchSourceFile(sf.file, sf.content.take(pos) ++ sf.content.drop(pos + 1)) + inputs(sfidx) = sf1 + askReload(sf1) + } + + def deleteAll() { + print("/"+nchars) + for (i <- 0 until nchars) { + if (toLeft) { + if (pos > 0 && pos <= inputs(sfidx).length) { + pos -= 1 + deleteOne() + } + } else { + if (pos < inputs(sfidx).length) { + deleteOne() + } + } + } + } + + def insertAll() { + for (chr <- if (toLeft) deleted else deleted.reverse) { + val sf = inputs(sfidx) + val (pre, post) = sf./*!*/content splitAt pos + pos += 1 + val sf1 = new BatchSourceFile(sf.file, pre ++ (chr +: post)) + inputs(sfidx) = sf1 + askReload(sf1) + } + } + } + + val testComment = "/**/" + + def testFileChanges(sfidx: Int) = { + lazy val testPositions: Seq[Int] = { + val sf = inputs(sfidx) + val buf = new ArrayBuffer[Int] + var pos = sf.content.indexOfSlice(testComment) + while (pos > 0) { + buf += pos + pos = sf.content.indexOfSlice(testComment, pos + 1) + } + buf + } + def otherTest() { + if (testPositions.nonEmpty) { + val pos = new OffsetPosition(inputs(sfidx), rand.nextInt(testPositions.length)) + rand.nextInt(3) match { + case 0 => askTypeAt(pos) + case 1 => askTypeCompletion(pos) + case 2 => askScopeCompletion(pos) + } + } + } + for (i <- 0 until randomBatchesPerSourceFile()) { + val changes = Vector.fill(/**/randomChangesPerBatch()) { + /**/ + new Change(sfidx, randomPositionIn(inputs(sfidx)), randomNumChars(), rand.nextBoolean()) + } + doTest(sfidx, changes, testPositions, otherTest) match { + case Some(errortrace) => + println(errortrace) + minimize(errortrace) + case None => + } + } + } + + def doTest(sfidx: Int, changes: Seq[Change], testPositions: Seq[Int], otherTest: () => Unit): Option[ErrorTrace] = { + print("new round with "+changes.length+" changes:") + changes foreach (_.deleteAll()) + otherTest() + def errorCount() = compiler.ask(() => reporter.ERROR.count) +// println("\nhalf test round: "+errorCount()) + changes.view.reverse foreach (_.insertAll()) + otherTest() + println("done test round: "+errorCount()) + if (errorCount() != 0) + Some(ErrorTrace(sfidx, changes, reporter.infos, inputs(sfidx).content)) + else + None + } + + case class ErrorTrace( + sfidx: Int, changes: Seq[Change], infos: collection.Set[reporter.Info], content: Array[Char]) { + override def toString = + "Sourcefile: "+inputs(sfidx)+ + "\nChanges:\n "+changes.mkString("\n ")+ + "\nErrors:\n "+infos.mkString("\n ")+ + "\nContents:\n"+content.mkString + } + + def minimize(etrace: ErrorTrace) {} + + /**/ + def run() { + askReload(inputs: _*) + for (i <- 0 until ntests) + testFileChanges(randomSourceFileIdx()) + } +} + +/* A program to do presentation compiler stress tests. + * Usage: + * + * scala scala.tools.nsc.interactive.test.Tester <n> <files> + * + * where <n> is the number os tests to be run and <files> is the set of files to test. + * This will do random deletions and re-insertions in any of the files. + * At places where an empty comment /**/ appears it will in addition randomly + * do ask-types, type-completions, or scope-completions. + */ +object Tester { + def main(args: Array[String]) { + val settings = new Settings() + val (_, filenames) = settings.processArguments(args.toList.tail, true) + println("filenames = "+filenames) + val files = filenames.toArray map (str => new BatchSourceFile(AbstractFile.getFile(str)): SourceFile) + new Tester(args(0).toInt, files, settings).run() + sys.exit(0) + } +} |