From 3e1e2023ee65424f16da717f0d806543a458cb14 Mon Sep 17 00:00:00 2001 From: Anton Sviridov Date: Thu, 21 Mar 2024 07:43:48 +0000 Subject: [PATCH] Json snapshot tests (#194) --- build.sbt | 23 +- modules/generate/src/main/scala/render.scala | 11 +- modules/lsp/src/main/scala/enumTypes.scala | 27 + .../main/scala/generated/enumerations.scala | 105 ++++ modules/lsp/src/main/scala/json.scala | 13 +- .../textDocument_documentLink__request_0_ | 6 + .../textDocument_documentLink__request_1_ | 7 + .../textDocument_documentLink__request_2_ | 5 + .../textDocument_documentLink__request_3_ | 5 + .../textDocument_documentLink__request_4_ | 6 + .../textDocument_documentLink__response_0_ | 1 + .../textDocument_documentLink__response_1_ | 525 ++++++++++++++++++ .../textDocument_documentLink__response_2_ | 26 + .../textDocument_foldingRange__request_0_ | 6 + .../textDocument_foldingRange__request_1_ | 7 + .../textDocument_foldingRange__request_2_ | 5 + .../textDocument_foldingRange__request_3_ | 5 + .../textDocument_foldingRange__request_4_ | 6 + .../textDocument_foldingRange__response_0_ | 1 + .../textDocument_foldingRange__response_1_ | 216 +++++++ .../textDocument_foldingRange__response_2_ | 303 ++++++++++ .../textDocument_foldingRange__response_3_ | 224 ++++++++ .../tests/textDocument_references__request_0_ | 13 + .../tests/textDocument_references__request_1_ | 13 + .../tests/textDocument_references__request_2_ | 13 + .../tests/textDocument_references__request_3_ | 13 + .../tests/textDocument_references__request_4_ | 13 + .../textDocument_references__response_0_ | 1 + .../textDocument_references__response_1_ | 457 +++++++++++++++ .../tests/workspace_configuration__request_0_ | 285 ++++++++++ .../tests/workspace_configuration__request_1_ | 252 +++++++++ .../tests/workspace_configuration__request_2_ | 7 + .../tests/workspace_configuration__request_3_ | 209 +++++++ .../tests/workspace_configuration__request_4_ | 40 ++ .../workspace_configuration__response_0_ | 123 ++++ .../workspace_configuration__response_1_ | 151 +++++ .../workspace_configuration__response_2_ | 211 +++++++ .../workspace_configuration__response_3_ | 301 ++++++++++ .../workspace_configuration__response_4_ | 106 ++++ .../textDocument_documentLink__request_0_ | 6 + .../textDocument_documentLink__request_1_ | 7 + .../textDocument_documentLink__request_2_ | 5 + .../textDocument_documentLink__request_3_ | 5 + .../textDocument_documentLink__request_4_ | 6 + .../textDocument_documentLink__response_0_ | 1 + .../textDocument_documentLink__response_1_ | 525 ++++++++++++++++++ .../textDocument_documentLink__response_2_ | 26 + .../textDocument_foldingRange__request_0_ | 6 + .../textDocument_foldingRange__request_1_ | 7 + .../textDocument_foldingRange__request_2_ | 5 + .../textDocument_foldingRange__request_3_ | 5 + .../textDocument_foldingRange__request_4_ | 6 + .../textDocument_foldingRange__response_0_ | 1 + .../textDocument_foldingRange__response_1_ | 216 +++++++ .../textDocument_foldingRange__response_2_ | 303 ++++++++++ .../textDocument_foldingRange__response_3_ | 224 ++++++++ .../textDocument_references__request_0_ | 13 + .../textDocument_references__request_1_ | 13 + .../textDocument_references__request_2_ | 13 + .../textDocument_references__request_3_ | 13 + .../textDocument_references__request_4_ | 13 + .../textDocument_references__response_0_ | 1 + .../textDocument_references__response_1_ | 457 +++++++++++++++ .../workspace_configuration__request_0_ | 285 ++++++++++ .../workspace_configuration__request_1_ | 252 +++++++++ .../workspace_configuration__request_2_ | 7 + .../workspace_configuration__request_3_ | 209 +++++++ .../workspace_configuration__request_4_ | 40 ++ .../workspace_configuration__response_0_ | 123 ++++ .../workspace_configuration__response_1_ | 151 +++++ .../workspace_configuration__response_2_ | 211 +++++++ .../workspace_configuration__response_3_ | 301 ++++++++++ .../workspace_configuration__response_4_ | 106 ++++ .../textDocument_documentLink__request_0_ | 6 + .../textDocument_documentLink__request_1_ | 7 + .../textDocument_documentLink__request_2_ | 5 + .../textDocument_documentLink__request_3_ | 5 + .../textDocument_documentLink__request_4_ | 6 + .../textDocument_documentLink__response_0_ | 1 + .../textDocument_documentLink__response_1_ | 525 ++++++++++++++++++ .../textDocument_documentLink__response_2_ | 26 + .../textDocument_foldingRange__request_0_ | 6 + .../textDocument_foldingRange__request_1_ | 7 + .../textDocument_foldingRange__request_2_ | 5 + .../textDocument_foldingRange__request_3_ | 5 + .../textDocument_foldingRange__request_4_ | 6 + .../textDocument_foldingRange__response_0_ | 1 + .../textDocument_foldingRange__response_1_ | 216 +++++++ .../textDocument_foldingRange__response_2_ | 303 ++++++++++ .../textDocument_foldingRange__response_3_ | 224 ++++++++ .../textDocument_references__request_0_ | 13 + .../textDocument_references__request_1_ | 13 + .../textDocument_references__request_2_ | 13 + .../textDocument_references__request_3_ | 13 + .../textDocument_references__request_4_ | 13 + .../textDocument_references__response_0_ | 1 + .../textDocument_references__response_1_ | 457 +++++++++++++++ .../workspace_configuration__request_0_ | 285 ++++++++++ .../workspace_configuration__request_1_ | 252 +++++++++ .../workspace_configuration__request_2_ | 7 + .../workspace_configuration__request_3_ | 209 +++++++ .../workspace_configuration__request_4_ | 40 ++ .../workspace_configuration__response_0_ | 123 ++++ .../workspace_configuration__response_1_ | 151 +++++ .../workspace_configuration__response_2_ | 211 +++++++ .../workspace_configuration__response_3_ | 301 ++++++++++ .../workspace_configuration__response_4_ | 106 ++++ modules/tests/src/test/scala/CodecTest.scala | 102 ++-- .../scala/DeriveScalacheckArbitrary.scala | 77 +++ .../src/test/scala/SnapshotsIntegration.scala | 38 ++ project/build.properties | 2 +- project/plugins.sbt | 29 +- 112 files changed, 11034 insertions(+), 79 deletions(-) create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_3_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_references__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/textDocument_references__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_3_ create mode 100644 modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_4_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_0_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_1_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_2_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_3_ create mode 100644 modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_4_ create mode 100644 modules/tests/src/test/scala/DeriveScalacheckArbitrary.scala create mode 100644 modules/tests/src/test/scala/SnapshotsIntegration.scala diff --git a/build.sbt b/build.sbt index 31b5c6abf..7e69e09a6 100644 --- a/build.sbt +++ b/build.sbt @@ -30,17 +30,17 @@ inThisBuild( ) val V = new { - val scala = "3.3.0" - val scribe = "3.11.1" + val scala = "3.3.3" + val scribe = "3.13.1" val upickle = "2.0.0" - val cats = "2.9.0" + val cats = "2.10.0" val jsonrpclib = "0.0.5" - val fs2 = "3.5.0" - val http4s = "0.23.23" + val fs2 = "3.10.0" + val http4s = "0.23.26" val laminar = "0.14.5" val decline = "2.4.1" val jsoniter = "2.20.3" - val weaver = "0.8.3" + val weaver = "0.8.4" val circe = "0.14.5" val http4sJdkClient = "0.9.1" val organizeImports = "0.6.0" @@ -192,8 +192,17 @@ lazy val tests = projectMatrix .settings( libraryDependencies += "org.http4s" %% "http4s-jdk-http-client" % V.http4sJdkClient % Test, libraryDependencies += "com.disneystreaming" %%% "weaver-cats" % V.weaver % Test, - Test / fork := virtualAxes.value.contains(VirtualAxis.jvm) + libraryDependencies += "com.lihaoyi" %%% "pprint" % "0.8.1" % Test, + libraryDependencies += "org.typelevel" %%% "shapeless3-deriving" % "3.4.1" % Test, + libraryDependencies += "org.scalacheck" %%% "scalacheck" % "1.17.0" % Test, + libraryDependencies += "io.github.irevive" %%% "union-derivation-core" % "0.1.0" % Test, + scalaJSLinkerConfig ~= (_.withModuleKind(ModuleKind.CommonJSModule)), + Test / fork := virtualAxes.value.contains(VirtualAxis.jvm), + snapshotsPackageName := "tests.core", + snapshotsForceOverwrite := !sys.env.contains("CI"), + scalacOptions += "-Yretain-trees" ) + .enablePlugins(SnapshotsPlugin) lazy val example = projectMatrix .in(file("modules/example")) diff --git a/modules/generate/src/main/scala/render.scala b/modules/generate/src/main/scala/render.scala index af896e399..cf2d07efa 100644 --- a/modules/generate/src/main/scala/render.scala +++ b/modules/generate/src/main/scala/render.scala @@ -1072,6 +1072,7 @@ class Render(manager: Manager, packageName: String = "langoustine.lsp"): if a.values.nonEmpty then line(s"object ${a.name} extends $impl[${a.name}]:") nest { + val rendered = List.newBuilder[String] a.values.foreach { entry => val value = base match @@ -1083,9 +1084,17 @@ class Render(manager: Manager, packageName: String = "langoustine.lsp"): cw.commentLine(d.value) } } - line(s"val ${sanitise(entry.name.value)} = entry($value)") + val entryName = sanitise(entry.name.value) + rendered += entryName + line(s"val ${entryName} = entry($value)") } + line("override def ALL = Set(") + nest { + line(rendered.result.mkString(", ")) + } + line(")") + } end if line("") diff --git a/modules/lsp/src/main/scala/enumTypes.scala b/modules/lsp/src/main/scala/enumTypes.scala index 9d2fe4075..7cf144ea4 100644 --- a/modules/lsp/src/main/scala/enumTypes.scala +++ b/modules/lsp/src/main/scala/enumTypes.scala @@ -21,11 +21,24 @@ import runtime.* import upickle.default.* import scala.reflect.* +trait Bijection[A, T]: + def apply(a: A): T + def reverse(a: T): A + def domain: Set[A] + private[lsp] trait IntEnum[T](using ev: T =:= Int): private val intCodec = upickle.default.readwriter[Int] given reader: Reader[T] = intCodec.asInstanceOf[Reader[T]] given writer: Writer[T] = intCodec.asInstanceOf[Writer[T]] + protected def ALL: Set[T] + + given Bijection[T, Int] with + def apply(a: T): Int = ev.apply(a) + def reverse(a: Int): T = + ev.flip.apply(a) + lazy val domain = ALL + given Typeable[T] with def unapply(s: Any): Option[s.type & T] = s match @@ -42,6 +55,12 @@ private[lsp] trait StringEnum[T](using ev: T =:= String): private val stringCodec = upickle.default.readwriter[String] given reader: Reader[T] = stringCodec.asInstanceOf[Reader[T]] given writer: Writer[T] = stringCodec.asInstanceOf[Writer[T]] + protected def ALL: Set[T] + + given Bijection[T, String] with + def apply(a: T): String = ev.apply(a) + def reverse(a: String): T = ev.flip.apply(a) + lazy val domain = ALL given Typeable[T] with def unapply(s: Any): Option[s.type & T] = @@ -61,6 +80,14 @@ private[lsp] trait UIntEnum[T](using ev: T =:= uinteger): given reader: Reader[T] = intCodec.asInstanceOf[Reader[T]] given writer: Writer[T] = intCodec.asInstanceOf[Writer[T]] + protected def ALL: Set[T] + + given Bijection[T, uinteger] with + def apply(a: T): uinteger = ev.apply(a) + def reverse(a: uinteger): T = + ev.flip.apply(a) + lazy val domain = ALL + given Typeable[T] with def unapply(s: Any): Option[s.type & T] = s match diff --git a/modules/lsp/src/main/scala/generated/enumerations.scala b/modules/lsp/src/main/scala/generated/enumerations.scala index 55a68ccd8..c7b72c921 100644 --- a/modules/lsp/src/main/scala/generated/enumerations.scala +++ b/modules/lsp/src/main/scala/generated/enumerations.scala @@ -65,6 +65,9 @@ object enumerations: * @since 3.17.0 */ val decorator = entry("decorator") + override def ALL = Set( + namespace, `type`, `class`, `enum`, interface, struct, typeParameter, parameter, variable, property, enumMember, event, function, method, `macro`, keyword, modifier, comment, string, number, regexp, operator, decorator + ) /** * A set of predefined token modifiers. This set is not fixed @@ -85,6 +88,9 @@ object enumerations: val modification = entry("modification") val documentation = entry("documentation") val defaultLibrary = entry("defaultLibrary") + override def ALL = Set( + declaration, definition, readonly, static, deprecated, `abstract`, async, modification, documentation, defaultLibrary + ) /** * Predefined error codes. @@ -127,6 +133,9 @@ object enumerations: * @deprecated use jsonrpcReservedErrorRangeEnd */ val serverErrorEnd = entry(-32000) + override def ALL = Set( + ParseError, InvalidRequest, MethodNotFound, InvalidParams, InternalError, jsonrpcReservedErrorRangeStart, serverErrorStart, ServerNotInitialized, UnknownErrorCode, jsonrpcReservedErrorRangeEnd, serverErrorEnd + ) opaque type LSPErrorCodes = Int object LSPErrorCodes extends IntEnum[LSPErrorCodes]: @@ -177,6 +186,9 @@ object enumerations: * @since 3.16.0 */ val lspReservedErrorRangeEnd = entry(-32800) + override def ALL = Set( + lspReservedErrorRangeStart, RequestFailed, ServerCancelled, ContentModified, RequestCancelled, lspReservedErrorRangeEnd + ) /** * A set of predefined range kinds. @@ -195,6 +207,9 @@ object enumerations: * Folding range for a region (e.g. `#region`) */ val Region = entry("region") + override def ALL = Set( + Comment, Imports, Region + ) /** * A symbol kind. @@ -227,6 +242,9 @@ object enumerations: val Event = entry(24) val Operator = entry(25) val TypeParameter = entry(26) + override def ALL = Set( + File, Module, Namespace, Package, Class, Method, Property, Field, Constructor, Enum, Interface, Function, Variable, Constant, String, Number, Boolean, Array, Object, Key, Null, EnumMember, Struct, Event, Operator, TypeParameter + ) /** * Symbol tags are extra annotations that tweak the rendering of a symbol. @@ -239,6 +257,9 @@ object enumerations: * Render a symbol as obsolete, usually using a strike-out. */ val Deprecated = entry(1) + override def ALL = Set( + Deprecated + ) /** * Moniker uniqueness level to define scope of the moniker. @@ -267,6 +288,9 @@ object enumerations: * The moniker is globally unique */ val global = entry("global") + override def ALL = Set( + document, project, group, scheme, global + ) /** * The moniker kind. @@ -288,6 +312,9 @@ object enumerations: * variable of a function, a class not visible outside the project, ...) */ val local = entry("local") + override def ALL = Set( + `import`, `export`, local + ) /** * Inlay hint kinds. @@ -304,6 +331,9 @@ object enumerations: * An inlay hint that is for a parameter. */ val Parameter = entry(2) + override def ALL = Set( + Type, Parameter + ) /** * The message type @@ -326,6 +356,9 @@ object enumerations: * A log message. */ val Log = entry(4) + override def ALL = Set( + Error, Warning, Info, Log + ) /** * Defines how the host (editor) should sync @@ -348,6 +381,9 @@ object enumerations: * sent. */ val Incremental = entry(2) + override def ALL = Set( + None, Full, Incremental + ) /** * Represents reasons why a text document is saved. @@ -367,6 +403,9 @@ object enumerations: * When the editor lost focus. */ val FocusOut = entry(3) + override def ALL = Set( + Manual, AfterDelay, FocusOut + ) /** * The kind of a completion entry. @@ -398,6 +437,9 @@ object enumerations: val Event = entry(23) val Operator = entry(24) val TypeParameter = entry(25) + override def ALL = Set( + Text, Method, Function, Constructor, Field, Variable, Class, Interface, Module, Property, Unit, Value, Enum, Keyword, Snippet, Color, File, Reference, Folder, EnumMember, Constant, Struct, Event, Operator, TypeParameter + ) /** * Completion item tags are extra annotations that tweak the rendering of a completion @@ -411,6 +453,9 @@ object enumerations: * Render a completion as obsolete, usually using a strike-out. */ val Deprecated = entry(1) + override def ALL = Set( + Deprecated + ) /** * Defines whether the insert text in a completion item should be interpreted as @@ -433,6 +478,9 @@ object enumerations: * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax */ val Snippet = entry(2) + override def ALL = Set( + PlainText, Snippet + ) /** * How whitespace and indentation is handled during completion @@ -460,6 +508,9 @@ object enumerations: * following lines inserted will be indented using 2 tabs as well. */ val adjustIndentation = entry(2) + override def ALL = Set( + asIs, adjustIndentation + ) /** * A document highlight kind. @@ -478,6 +529,9 @@ object enumerations: * Write-access of a symbol, like writing to a variable. */ val Write = entry(3) + override def ALL = Set( + Text, Read, Write + ) /** * A set of predefined code action kinds @@ -551,6 +605,9 @@ object enumerations: * @since 3.15.0 */ val SourceFixAll = entry("source.fixAll") + override def ALL = Set( + Empty, QuickFix, Refactor, RefactorExtract, RefactorInline, RefactorRewrite, Source, SourceOrganizeImports, SourceFixAll + ) opaque type TraceValues = String object TraceValues extends StringEnum[TraceValues]: @@ -566,6 +623,9 @@ object enumerations: * Verbose message tracing. */ val Verbose = entry("verbose") + override def ALL = Set( + Off, Messages, Verbose + ) /** * Describes the content type that a client supports in various @@ -584,6 +644,9 @@ object enumerations: * Markdown is supported as a content format */ val Markdown = entry("markdown") + override def ALL = Set( + PlainText, Markdown + ) /** * A set of predefined position encoding kinds. @@ -611,6 +674,9 @@ object enumerations: * encoding-agnostic representation of character offsets. */ val UTF32 = entry("utf-32") + override def ALL = Set( + UTF8, UTF16, UTF32 + ) /** * The file event type @@ -629,6 +695,9 @@ object enumerations: * The file got deleted. */ val Deleted = entry(3) + override def ALL = Set( + Created, Changed, Deleted + ) opaque type WatchKind = runtime.uinteger object WatchKind extends UIntEnum[WatchKind]: @@ -644,6 +713,9 @@ object enumerations: * Interested in delete events */ val Delete = entry(4) + override def ALL = Set( + Create, Change, Delete + ) /** * The diagnostic's severity. @@ -666,6 +738,9 @@ object enumerations: * Reports a hint. */ val Hint = entry(4) + override def ALL = Set( + Error, Warning, Information, Hint + ) /** * The diagnostic tags. @@ -687,6 +762,9 @@ object enumerations: * Clients are allowed to rendered diagnostics with this tag strike through. */ val Deprecated = entry(2) + override def ALL = Set( + Unnecessary, Deprecated + ) /** * How a completion was triggered @@ -707,6 +785,9 @@ object enumerations: * Completion was re-triggered as current completion list is incomplete */ val TriggerForIncompleteCompletions = entry(3) + override def ALL = Set( + Invoked, TriggerCharacter, TriggerForIncompleteCompletions + ) /** * How a signature help was triggered. @@ -727,6 +808,9 @@ object enumerations: * Signature help was triggered by the cursor moving or by the document content changing. */ val ContentChange = entry(3) + override def ALL = Set( + Invoked, TriggerCharacter, ContentChange + ) /** * The reason why code actions were requested. @@ -746,6 +830,9 @@ object enumerations: * also be triggered when file content changes. */ val Automatic = entry(2) + override def ALL = Set( + Invoked, Automatic + ) /** * A pattern kind describing if a glob pattern matches a file a folder or @@ -763,6 +850,9 @@ object enumerations: * The pattern matches a folder only. */ val folder = entry("folder") + override def ALL = Set( + file, folder + ) /** * A notebook cell kind. @@ -779,6 +869,9 @@ object enumerations: * A code-cell is source code. */ val Code = entry(2) + override def ALL = Set( + Markup, Code + ) opaque type ResourceOperationKind = String object ResourceOperationKind extends StringEnum[ResourceOperationKind]: @@ -794,6 +887,9 @@ object enumerations: * Supports deleting existing files and folders. */ val Delete = entry("delete") + override def ALL = Set( + Create, Rename, Delete + ) opaque type FailureHandlingKind = String object FailureHandlingKind extends StringEnum[FailureHandlingKind]: @@ -818,6 +914,9 @@ object enumerations: * guarantee that this is succeeding. */ val Undo = entry("undo") + override def ALL = Set( + Abort, Transactional, TextOnlyTransactional, Undo + ) opaque type PrepareSupportDefaultBehavior = runtime.uinteger object PrepareSupportDefaultBehavior extends UIntEnum[PrepareSupportDefaultBehavior]: @@ -826,8 +925,14 @@ object enumerations: * according the to language's syntax rule. */ val Identifier = entry(1) + override def ALL = Set( + Identifier + ) opaque type TokenFormat = String object TokenFormat extends StringEnum[TokenFormat]: val Relative = entry("relative") + override def ALL = Set( + Relative + ) diff --git a/modules/lsp/src/main/scala/json.scala b/modules/lsp/src/main/scala/json.scala index 87a94b474..a48a4f939 100644 --- a/modules/lsp/src/main/scala/json.scala +++ b/modules/lsp/src/main/scala/json.scala @@ -24,24 +24,25 @@ private[lsp] object json: val valueReader = upickle.default.readwriter[ujson.Value] def badMerge[T](r1: => Reader[?], rest: Reader[?]*): Reader[T] = valueReader.map { json => - var t: T | Null = null - val stack = Vector.newBuilder[Throwable] + var t = Option.empty[T] + val stack = Vector.newBuilder[Throwable] (r1 +: rest).foreach { reader => - if t == null then + if t.isEmpty then try - t = + t = Some( read[T](json, trace = true)(using reader.asInstanceOf[Reader[T]]) + ) catch case exc => stack += exc } - if t != null then t.nn - else + t.getOrElse( throw new LangoustineError.FailureParsing( json, stack.result().headOption.getOrElse(null) ) + ) } extension [T](r: Reader[T]) def widen[K >: T] = r.map(_.asInstanceOf[K]) diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_0_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_0_ new file mode 100644 index 000000000..84f3e644c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_0_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_1_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_1_ new file mode 100644 index 000000000..214e636b1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_1_ @@ -0,0 +1,7 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": 25, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_2_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_2_ new file mode 100644 index 000000000..66f49eae1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_2_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file2" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_3_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_3_ new file mode 100644 index 000000000..2c7719bdf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_3_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file1" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_4_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_4_ new file mode 100644 index 000000000..8913ca17c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__request_4_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_0_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_1_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_1_ new file mode 100644 index 000000000..858b3e825 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_1_ @@ -0,0 +1,525 @@ +[ + { + "range": { + "start": { + "line": 62, + "character": 12 + }, + "end": { + "line": 99, + "character": 86 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 38, + "character": 10 + }, + "end": { + "line": 77, + "character": 53 + } + } + }, + { + "range": { + "start": { + "line": 87, + "character": 58 + }, + "end": { + "line": 68, + "character": 50 + } + }, + "target": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 16, + "character": 79 + }, + "end": { + "line": 65, + "character": 19 + } + } + }, + { + "range": { + "start": { + "line": 62, + "character": 77 + }, + "end": { + "line": 20, + "character": 15 + } + }, + "target": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 42, + "character": 49 + }, + "end": { + "line": 97, + "character": 100 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 45, + "character": 91 + }, + "end": { + "line": 25, + "character": 19 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 54, + "character": 82 + }, + "end": { + "line": 61, + "character": 4 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 77, + "character": 31 + }, + "end": { + "line": 35, + "character": 24 + } + }, + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 60, + "character": 21 + }, + "end": { + "line": 42, + "character": 13 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 62, + "character": 86 + }, + "end": { + "line": 73, + "character": 12 + } + }, + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 33, + "character": 9 + }, + "end": { + "line": 93, + "character": 2 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 64, + "character": 3 + }, + "end": { + "line": 79, + "character": 96 + } + }, + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 19, + "character": 42 + }, + "end": { + "line": 96, + "character": 25 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 72, + "character": 31 + }, + "end": { + "line": 73, + "character": 60 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 22, + "character": 52 + }, + "end": { + "line": 89, + "character": 51 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 6, + "character": 50 + }, + "end": { + "line": 50, + "character": 26 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 73, + "character": 17 + }, + "end": { + "line": 91, + "character": 13 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 83, + "character": 4 + }, + "end": { + "line": 24, + "character": 87 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 5, + "character": 75 + }, + "end": { + "line": 58, + "character": 83 + } + }, + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 24, + "character": 13 + }, + "end": { + "line": 19, + "character": 24 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 41, + "character": 35 + }, + "end": { + "line": 80, + "character": 74 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 98, + "character": 10 + }, + "end": { + "line": 78, + "character": 91 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 86, + "character": 76 + }, + "end": { + "line": 26, + "character": 2 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 44, + "character": 95 + }, + "end": { + "line": 3, + "character": 2 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 63, + "character": 100 + }, + "end": { + "line": 86, + "character": 55 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 8, + "character": 30 + }, + "end": { + "line": 69, + "character": 24 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 21, + "character": 55 + }, + "end": { + "line": 13, + "character": 51 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 41, + "character": 22 + }, + "end": { + "line": 56, + "character": 66 + } + }, + "tooltip": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 57, + "character": 35 + }, + "end": { + "line": 84, + "character": 45 + } + } + }, + { + "range": { + "start": { + "line": 72, + "character": 56 + }, + "end": { + "line": 39, + "character": 50 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 4, + "character": 97 + }, + "end": { + "line": 83, + "character": 54 + } + } + }, + { + "range": { + "start": { + "line": 22, + "character": 62 + }, + "end": { + "line": 51, + "character": 48 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 99, + "character": 91 + }, + "end": { + "line": 40, + "character": 76 + } + } + }, + { + "range": { + "start": { + "line": 53, + "character": 17 + }, + "end": { + "line": 74, + "character": 27 + } + }, + "target": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_2_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_2_ new file mode 100644 index 000000000..5ab9317d5 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_documentLink__response_2_ @@ -0,0 +1,26 @@ +[ + { + "range": { + "start": { + "line": 52, + "character": 1 + }, + "end": { + "line": 58, + "character": 82 + } + } + }, + { + "range": { + "start": { + "line": 13, + "character": 34 + }, + "end": { + "line": 5, + "character": 12 + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_0_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_0_ new file mode 100644 index 000000000..84f3e644c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_0_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_1_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_1_ new file mode 100644 index 000000000..214e636b1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_1_ @@ -0,0 +1,7 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": 25, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_2_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_2_ new file mode 100644 index 000000000..66f49eae1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_2_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file2" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_3_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_3_ new file mode 100644 index 000000000..2c7719bdf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_3_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file1" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_4_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_4_ new file mode 100644 index 000000000..8913ca17c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__request_4_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_0_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_1_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_1_ new file mode 100644 index 000000000..d84dbcb35 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_1_ @@ -0,0 +1,216 @@ +[ + { + "startLine": 62, + "endLine": 99, + "endCharacter": 86, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 38, + "startCharacter": 10, + "endLine": 53 + }, + { + "startLine": 87, + "endLine": 68, + "endCharacter": 50, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 16, + "startCharacter": 79, + "endLine": 19 + }, + { + "startLine": 77, + "startCharacter": 20, + "endLine": 71, + "collapsedText": "randomString" + }, + { + "startLine": 42, + "startCharacter": 49, + "endLine": 100, + "endCharacter": 60 + }, + { + "startLine": 8, + "startCharacter": 47, + "endLine": 91, + "endCharacter": 25, + "kind": "imports" + }, + { + "startLine": 86, + "startCharacter": 29, + "endLine": 54, + "endCharacter": 82, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 90, + "endLine": 77, + "endCharacter": 31 + }, + { + "startLine": 50, + "startCharacter": 13, + "endLine": 55, + "endCharacter": 60, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 2, + "startCharacter": 43, + "endLine": 32, + "kind": "region" + }, + { + "startLine": 96, + "endLine": 47, + "endCharacter": 82, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 96, + "startCharacter": 25, + "endLine": 38, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 72, + "startCharacter": 31, + "endLine": 60, + "endCharacter": 4, + "kind": "imports" + }, + { + "startLine": 22, + "endLine": 89, + "endCharacter": 51 + }, + { + "startLine": 50, + "endLine": 26, + "endCharacter": 15, + "collapsedText": "randomString" + }, + { + "startLine": 73, + "startCharacter": 17, + "endLine": 13, + "endCharacter": 89 + }, + { + "startLine": 50, + "startCharacter": 21, + "endLine": 4, + "endCharacter": 24, + "kind": "imports" + }, + { + "startLine": 34, + "startCharacter": 40, + "endLine": 75, + "endCharacter": 58 + }, + { + "startLine": 77, + "startCharacter": 45, + "endLine": 24, + "endCharacter": 13, + "collapsedText": "randomString" + }, + { + "startLine": 59, + "startCharacter": 82, + "endLine": 35, + "collapsedText": "randomString" + }, + { + "startLine": 41, + "endLine": 98, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 14, + "endLine": 76, + "collapsedText": "randomString" + }, + { + "startLine": 43, + "startCharacter": 44, + "endLine": 3, + "collapsedText": "randomString" + }, + { + "startLine": 9, + "startCharacter": 23, + "endLine": 100, + "endCharacter": 86, + "kind": "imports" + }, + { + "startLine": 55, + "endLine": 8, + "endCharacter": 30, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 53, + "endLine": 69, + "endCharacter": 21, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 86, + "endLine": 22 + }, + { + "startLine": 50, + "startCharacter": 70, + "endLine": 4, + "endCharacter": 57, + "kind": "imports" + }, + { + "startLine": 62, + "endLine": 100, + "collapsedText": "randomString" + }, + { + "startLine": 81, + "endLine": 82, + "kind": "imports" + }, + { + "startLine": 62, + "endLine": 82, + "kind": "comment" + }, + { + "startLine": 45, + "startCharacter": 100, + "endLine": 65, + "endCharacter": 99 + }, + { + "startLine": 81, + "endLine": 84, + "endCharacter": 53, + "collapsedText": "randomString" + }, + { + "startLine": 58, + "endLine": 94 + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_2_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_2_ new file mode 100644 index 000000000..a6631335f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_2_ @@ -0,0 +1,303 @@ +[ + { + "startLine": 13, + "startCharacter": 34, + "endLine": 12 + }, + { + "startLine": 56, + "endLine": 97, + "endCharacter": 1, + "kind": "imports" + }, + { + "startLine": 3, + "endLine": 7, + "endCharacter": 7 + }, + { + "startLine": 75, + "startCharacter": 87, + "endLine": 11, + "endCharacter": 85, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 99, + "startCharacter": 67, + "endLine": 65, + "endCharacter": 72, + "collapsedText": "randomString" + }, + { + "startLine": 38, + "endLine": 12, + "endCharacter": 18, + "kind": "imports" + }, + { + "startLine": 28, + "endLine": 74, + "endCharacter": 75, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 80, + "startCharacter": 17, + "endLine": 59, + "kind": "imports" + }, + { + "startLine": 16, + "endLine": 28, + "endCharacter": 32, + "collapsedText": "randomString" + }, + { + "startLine": 71, + "endLine": 69, + "collapsedText": "randomString" + }, + { + "startLine": 85, + "endLine": 51, + "endCharacter": 26 + }, + { + "startLine": 46, + "startCharacter": 20, + "endLine": 44, + "endCharacter": 40, + "kind": "comment" + }, + { + "startLine": 54, + "startCharacter": 16, + "endLine": 42, + "endCharacter": 49 + }, + { + "startLine": 66, + "startCharacter": 73, + "endLine": 76, + "collapsedText": "randomString" + }, + { + "startLine": 50, + "startCharacter": 4, + "endLine": 63, + "endCharacter": 48, + "kind": "region" + }, + { + "startLine": 72, + "startCharacter": 72, + "endLine": 6, + "collapsedText": "randomString" + }, + { + "startLine": 59, + "startCharacter": 86, + "endLine": 50, + "collapsedText": "randomString" + }, + { + "startLine": 73, + "endLine": 60, + "endCharacter": 51, + "kind": "imports" + }, + { + "startLine": 68, + "endLine": 53, + "endCharacter": 97, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 13, + "startCharacter": 25, + "endLine": 78 + }, + { + "startLine": 43, + "startCharacter": 46, + "endLine": 80, + "collapsedText": "randomString" + }, + { + "startLine": 90, + "endLine": 42 + }, + { + "startLine": 99, + "endLine": 61, + "endCharacter": 2, + "kind": "imports" + }, + { + "startLine": 14, + "endLine": 64, + "collapsedText": "randomString" + }, + { + "startLine": 75, + "endLine": 63, + "endCharacter": 46 + }, + { + "startLine": 63, + "startCharacter": 68, + "endLine": 52, + "endCharacter": 67, + "collapsedText": "randomString" + }, + { + "startLine": 25, + "startCharacter": 76, + "endLine": 98, + "endCharacter": 73, + "collapsedText": "randomString" + }, + { + "startLine": 62, + "startCharacter": 68, + "endLine": 7, + "endCharacter": 62, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 8, + "startCharacter": 12, + "endLine": 16, + "collapsedText": "randomString" + }, + { + "startLine": 65, + "endLine": 30, + "endCharacter": 10, + "kind": "region" + }, + { + "startLine": 76, + "endLine": 35, + "endCharacter": 57, + "kind": "comment" + }, + { + "startLine": 14, + "startCharacter": 14, + "endLine": 88, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 61, + "startCharacter": 2, + "endLine": 93, + "endCharacter": 11 + }, + { + "startLine": 77, + "startCharacter": 73, + "endLine": 58, + "endCharacter": 84 + }, + { + "startLine": 55, + "startCharacter": 85, + "endLine": 26, + "endCharacter": 66, + "collapsedText": "randomString" + }, + { + "startLine": 35, + "startCharacter": 65, + "endLine": 97 + }, + { + "startLine": 53, + "endLine": 29, + "endCharacter": 35, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 78, + "startCharacter": 87, + "endLine": 59, + "endCharacter": 28 + }, + { + "startLine": 55, + "endLine": 64, + "endCharacter": 1, + "kind": "comment" + }, + { + "startLine": 29, + "startCharacter": 74, + "endLine": 49, + "endCharacter": 25, + "collapsedText": "randomString" + }, + { + "startLine": 91, + "startCharacter": 2, + "endLine": 73 + }, + { + "startLine": 28, + "endLine": 86, + "kind": "comment" + }, + { + "startLine": 72, + "startCharacter": 30, + "endLine": 78, + "endCharacter": 12 + }, + { + "startLine": 42, + "startCharacter": 66, + "endLine": 45 + }, + { + "startLine": 41, + "endLine": 61 + }, + { + "startLine": 41, + "startCharacter": 79, + "endLine": 34, + "collapsedText": "randomString" + }, + { + "startLine": 61, + "startCharacter": 70, + "endLine": 22, + "endCharacter": 2, + "kind": "imports" + }, + { + "startLine": 29, + "endLine": 90, + "endCharacter": 86, + "collapsedText": "randomString" + }, + { + "startLine": 75, + "startCharacter": 5, + "endLine": 4, + "endCharacter": 38 + }, + { + "startLine": 63, + "startCharacter": 79, + "endLine": 88, + "collapsedText": "randomString" + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_3_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_3_ new file mode 100644 index 000000000..2439d98bb --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_foldingRange__response_3_ @@ -0,0 +1,224 @@ +[ + { + "startLine": 30, + "startCharacter": 94, + "endLine": 87, + "kind": "comment" + }, + { + "startLine": 62, + "endLine": 41, + "endCharacter": 10 + }, + { + "startLine": 15, + "startCharacter": 93, + "endLine": 90, + "endCharacter": 86 + }, + { + "startLine": 94, + "endLine": 25, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 93, + "endLine": 52 + }, + { + "startLine": 22, + "endLine": 31 + }, + { + "startLine": 13, + "startCharacter": 37, + "endLine": 99, + "kind": "imports" + }, + { + "startLine": 71, + "endLine": 52, + "endCharacter": 84, + "collapsedText": "randomString" + }, + { + "startLine": 54, + "endLine": 88, + "endCharacter": 56, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 49, + "startCharacter": 85, + "endLine": 37, + "endCharacter": 83, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 99, + "startCharacter": 73, + "endLine": 4, + "endCharacter": 54, + "collapsedText": "randomString" + }, + { + "startLine": 33, + "endLine": 88, + "collapsedText": "randomString" + }, + { + "startLine": 24, + "endLine": 88, + "collapsedText": "randomString" + }, + { + "startLine": 92, + "endLine": 56, + "kind": "comment" + }, + { + "startLine": 43, + "startCharacter": 100, + "endLine": 75, + "endCharacter": 91, + "collapsedText": "randomString" + }, + { + "startLine": 4, + "startCharacter": 100, + "endLine": 61, + "endCharacter": 13, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 9, + "endLine": 45, + "kind": "region" + }, + { + "startLine": 30, + "startCharacter": 31, + "endLine": 2, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 63, + "endLine": 98, + "endCharacter": 10, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 2, + "endLine": 9, + "endCharacter": 21, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 91, + "endLine": 44, + "endCharacter": 36, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 75, + "endLine": 61, + "endCharacter": 34, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 79, + "endLine": 52, + "collapsedText": "randomString" + }, + { + "startLine": 11, + "endLine": 17 + }, + { + "startLine": 89, + "startCharacter": 89, + "endLine": 76, + "endCharacter": 46, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 98, + "startCharacter": 19, + "endLine": 84 + }, + { + "startLine": 47, + "endLine": 12, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 86, + "endLine": 71, + "endCharacter": 30, + "collapsedText": "randomString" + }, + { + "startLine": 93, + "startCharacter": 40, + "endLine": 31, + "endCharacter": 50 + }, + { + "startLine": 92, + "endLine": 92, + "endCharacter": 26 + }, + { + "startLine": 24, + "endLine": 63, + "endCharacter": 74, + "kind": "region" + }, + { + "startLine": 69, + "startCharacter": 3, + "endLine": 73, + "endCharacter": 29, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 73, + "startCharacter": 43, + "endLine": 57 + }, + { + "startLine": 90, + "endLine": 79, + "endCharacter": 76, + "kind": "comment" + }, + { + "startLine": 19, + "endLine": 43, + "kind": "comment" + }, + { + "startLine": 68, + "endLine": 46, + "endCharacter": 85 + }, + { + "startLine": 51, + "startCharacter": 92, + "endLine": 71, + "endCharacter": 96, + "kind": "region" + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_0_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_0_ new file mode 100644 index 000000000..07cc1e02f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_0_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": true + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 3, + "character": 77 + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_1_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_1_ new file mode 100644 index 000000000..0d28aabcf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_1_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file2" + }, + "position": { + "line": 60, + "character": 62 + }, + "workDoneToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_2_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_2_ new file mode 100644 index 000000000..9b0cc872f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_2_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 23, + "character": 38 + }, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_3_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_3_ new file mode 100644 index 000000000..4ec3f405e --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_3_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file2" + }, + "position": { + "line": 87, + "character": 58 + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_4_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_4_ new file mode 100644 index 000000000..88c25dec9 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__request_4_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 16, + "character": 79 + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_references__response_0_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/textDocument_references__response_1_ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__response_1_ new file mode 100644 index 000000000..947736160 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/textDocument_references__response_1_ @@ -0,0 +1,457 @@ +[ + { + "uri": "file2", + "range": { + "start": { + "line": 39, + "character": 89 + }, + "end": { + "line": 3, + "character": 77 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 60, + "character": 62 + }, + "end": { + "line": 12, + "character": 99 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 10, + "character": 77 + }, + "end": { + "line": 53, + "character": 72 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 79, + "character": 62 + }, + "end": { + "line": 83, + "character": 23 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 90, + "character": 87 + }, + "end": { + "line": 58, + "character": 68 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 79, + "character": 65 + }, + "end": { + "line": 19, + "character": 22 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 71, + "character": 98 + }, + "end": { + "line": 36, + "character": 81 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 28, + "character": 62 + }, + "end": { + "line": 77, + "character": 20 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 49, + "character": 97 + }, + "end": { + "line": 100, + "character": 60 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 19, + "character": 33 + }, + "end": { + "line": 25, + "character": 94 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 8, + "character": 47 + }, + "end": { + "line": 45, + "character": 91 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 82, + "character": 61 + }, + "end": { + "line": 4, + "character": 97 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 96, + "character": 86 + }, + "end": { + "line": 29, + "character": 25 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 8, + "character": 77 + }, + "end": { + "line": 31, + "character": 35 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 21, + "character": 42 + }, + "end": { + "line": 13, + "character": 47 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 50, + "character": 13 + }, + "end": { + "line": 51, + "character": 55 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 32, + "character": 62 + }, + "end": { + "line": 86, + "character": 73 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 9, + "character": 93 + }, + "end": { + "line": 2, + "character": 43 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 38, + "character": 47 + }, + "end": { + "line": 82, + "character": 93 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 36, + "character": 64 + }, + "end": { + "line": 3, + "character": 79 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 42, + "character": 96 + }, + "end": { + "line": 25, + "character": 43 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 60, + "character": 4 + }, + "end": { + "line": 29, + "character": 32 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 84, + "character": 88 + }, + "end": { + "line": 72, + "character": 31 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 22, + "character": 52 + }, + "end": { + "line": 89, + "character": 51 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 26, + "character": 15 + }, + "end": { + "line": 67, + "character": 84 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 17, + "character": 36 + }, + "end": { + "line": 6, + "character": 50 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 73, + "character": 17 + }, + "end": { + "line": 91, + "character": 13 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 24, + "character": 87 + }, + "end": { + "line": 72, + "character": 61 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 56, + "character": 50 + }, + "end": { + "line": 21, + "character": 83 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 5, + "character": 75 + }, + "end": { + "line": 58, + "character": 83 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 19, + "character": 24 + }, + "end": { + "line": 71, + "character": 34 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 77, + "character": 45 + }, + "end": { + "line": 43, + "character": 24 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 41, + "character": 35 + }, + "end": { + "line": 80, + "character": 74 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 78, + "character": 91 + }, + "end": { + "line": 77, + "character": 59 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 73, + "character": 41 + }, + "end": { + "line": 4, + "character": 98 + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_0_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_0_ new file mode 100644 index 000000000..0584c5ad7 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_0_ @@ -0,0 +1,285 @@ +{ + "items": [ + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_1_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_1_ new file mode 100644 index 000000000..a54ccb4e7 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_1_ @@ -0,0 +1,252 @@ +{ + "items": [ + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_2_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_2_ new file mode 100644 index 000000000..4523198fc --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_2_ @@ -0,0 +1,7 @@ +{ + "items": [ + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_3_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_3_ new file mode 100644 index 000000000..099dea7c4 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_3_ @@ -0,0 +1,209 @@ +{ + "items": [ + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + } + ], + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_4_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_4_ new file mode 100644 index 000000000..fd8824ac0 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__request_4_ @@ -0,0 +1,40 @@ +{ + "items": [ + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + } + ], + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_0_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_0_ new file mode 100644 index 000000000..636081ff1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_0_ @@ -0,0 +1,123 @@ +[ + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_1_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_1_ new file mode 100644 index 000000000..e599026f0 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_1_ @@ -0,0 +1,151 @@ +[ + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_2_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_2_ new file mode 100644 index 000000000..15de30925 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_2_ @@ -0,0 +1,211 @@ +[ + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_3_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_3_ new file mode 100644 index 000000000..1b9b13d27 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_3_ @@ -0,0 +1,301 @@ +[ + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_4_ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_4_ new file mode 100644 index 000000000..f06525db3 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/tests/workspace_configuration__response_4_ @@ -0,0 +1,106 @@ +[ + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_0_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_0_ new file mode 100644 index 000000000..84f3e644c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_0_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_1_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_1_ new file mode 100644 index 000000000..214e636b1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_1_ @@ -0,0 +1,7 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": 25, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_2_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_2_ new file mode 100644 index 000000000..66f49eae1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_2_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file2" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_3_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_3_ new file mode 100644 index 000000000..2c7719bdf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_3_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file1" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_4_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_4_ new file mode 100644 index 000000000..8913ca17c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__request_4_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_0_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_1_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_1_ new file mode 100644 index 000000000..858b3e825 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_1_ @@ -0,0 +1,525 @@ +[ + { + "range": { + "start": { + "line": 62, + "character": 12 + }, + "end": { + "line": 99, + "character": 86 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 38, + "character": 10 + }, + "end": { + "line": 77, + "character": 53 + } + } + }, + { + "range": { + "start": { + "line": 87, + "character": 58 + }, + "end": { + "line": 68, + "character": 50 + } + }, + "target": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 16, + "character": 79 + }, + "end": { + "line": 65, + "character": 19 + } + } + }, + { + "range": { + "start": { + "line": 62, + "character": 77 + }, + "end": { + "line": 20, + "character": 15 + } + }, + "target": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 42, + "character": 49 + }, + "end": { + "line": 97, + "character": 100 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 45, + "character": 91 + }, + "end": { + "line": 25, + "character": 19 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 54, + "character": 82 + }, + "end": { + "line": 61, + "character": 4 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 77, + "character": 31 + }, + "end": { + "line": 35, + "character": 24 + } + }, + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 60, + "character": 21 + }, + "end": { + "line": 42, + "character": 13 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 62, + "character": 86 + }, + "end": { + "line": 73, + "character": 12 + } + }, + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 33, + "character": 9 + }, + "end": { + "line": 93, + "character": 2 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 64, + "character": 3 + }, + "end": { + "line": 79, + "character": 96 + } + }, + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 19, + "character": 42 + }, + "end": { + "line": 96, + "character": 25 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 72, + "character": 31 + }, + "end": { + "line": 73, + "character": 60 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 22, + "character": 52 + }, + "end": { + "line": 89, + "character": 51 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 6, + "character": 50 + }, + "end": { + "line": 50, + "character": 26 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 73, + "character": 17 + }, + "end": { + "line": 91, + "character": 13 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 83, + "character": 4 + }, + "end": { + "line": 24, + "character": 87 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 5, + "character": 75 + }, + "end": { + "line": 58, + "character": 83 + } + }, + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 24, + "character": 13 + }, + "end": { + "line": 19, + "character": 24 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 41, + "character": 35 + }, + "end": { + "line": 80, + "character": 74 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 98, + "character": 10 + }, + "end": { + "line": 78, + "character": 91 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 86, + "character": 76 + }, + "end": { + "line": 26, + "character": 2 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 44, + "character": 95 + }, + "end": { + "line": 3, + "character": 2 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 63, + "character": 100 + }, + "end": { + "line": 86, + "character": 55 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 8, + "character": 30 + }, + "end": { + "line": 69, + "character": 24 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 21, + "character": 55 + }, + "end": { + "line": 13, + "character": 51 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 41, + "character": 22 + }, + "end": { + "line": 56, + "character": 66 + } + }, + "tooltip": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 57, + "character": 35 + }, + "end": { + "line": 84, + "character": 45 + } + } + }, + { + "range": { + "start": { + "line": 72, + "character": 56 + }, + "end": { + "line": 39, + "character": 50 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 4, + "character": 97 + }, + "end": { + "line": 83, + "character": 54 + } + } + }, + { + "range": { + "start": { + "line": 22, + "character": 62 + }, + "end": { + "line": 51, + "character": 48 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 99, + "character": 91 + }, + "end": { + "line": 40, + "character": 76 + } + } + }, + { + "range": { + "start": { + "line": 53, + "character": 17 + }, + "end": { + "line": 74, + "character": 27 + } + }, + "target": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_2_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_2_ new file mode 100644 index 000000000..5ab9317d5 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_documentLink__response_2_ @@ -0,0 +1,26 @@ +[ + { + "range": { + "start": { + "line": 52, + "character": 1 + }, + "end": { + "line": 58, + "character": 82 + } + } + }, + { + "range": { + "start": { + "line": 13, + "character": 34 + }, + "end": { + "line": 5, + "character": 12 + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_0_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_0_ new file mode 100644 index 000000000..84f3e644c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_0_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_1_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_1_ new file mode 100644 index 000000000..214e636b1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_1_ @@ -0,0 +1,7 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": 25, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_2_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_2_ new file mode 100644 index 000000000..66f49eae1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_2_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file2" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_3_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_3_ new file mode 100644 index 000000000..2c7719bdf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_3_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file1" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_4_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_4_ new file mode 100644 index 000000000..8913ca17c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__request_4_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_0_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_1_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_1_ new file mode 100644 index 000000000..d84dbcb35 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_1_ @@ -0,0 +1,216 @@ +[ + { + "startLine": 62, + "endLine": 99, + "endCharacter": 86, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 38, + "startCharacter": 10, + "endLine": 53 + }, + { + "startLine": 87, + "endLine": 68, + "endCharacter": 50, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 16, + "startCharacter": 79, + "endLine": 19 + }, + { + "startLine": 77, + "startCharacter": 20, + "endLine": 71, + "collapsedText": "randomString" + }, + { + "startLine": 42, + "startCharacter": 49, + "endLine": 100, + "endCharacter": 60 + }, + { + "startLine": 8, + "startCharacter": 47, + "endLine": 91, + "endCharacter": 25, + "kind": "imports" + }, + { + "startLine": 86, + "startCharacter": 29, + "endLine": 54, + "endCharacter": 82, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 90, + "endLine": 77, + "endCharacter": 31 + }, + { + "startLine": 50, + "startCharacter": 13, + "endLine": 55, + "endCharacter": 60, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 2, + "startCharacter": 43, + "endLine": 32, + "kind": "region" + }, + { + "startLine": 96, + "endLine": 47, + "endCharacter": 82, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 96, + "startCharacter": 25, + "endLine": 38, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 72, + "startCharacter": 31, + "endLine": 60, + "endCharacter": 4, + "kind": "imports" + }, + { + "startLine": 22, + "endLine": 89, + "endCharacter": 51 + }, + { + "startLine": 50, + "endLine": 26, + "endCharacter": 15, + "collapsedText": "randomString" + }, + { + "startLine": 73, + "startCharacter": 17, + "endLine": 13, + "endCharacter": 89 + }, + { + "startLine": 50, + "startCharacter": 21, + "endLine": 4, + "endCharacter": 24, + "kind": "imports" + }, + { + "startLine": 34, + "startCharacter": 40, + "endLine": 75, + "endCharacter": 58 + }, + { + "startLine": 77, + "startCharacter": 45, + "endLine": 24, + "endCharacter": 13, + "collapsedText": "randomString" + }, + { + "startLine": 59, + "startCharacter": 82, + "endLine": 35, + "collapsedText": "randomString" + }, + { + "startLine": 41, + "endLine": 98, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 14, + "endLine": 76, + "collapsedText": "randomString" + }, + { + "startLine": 43, + "startCharacter": 44, + "endLine": 3, + "collapsedText": "randomString" + }, + { + "startLine": 9, + "startCharacter": 23, + "endLine": 100, + "endCharacter": 86, + "kind": "imports" + }, + { + "startLine": 55, + "endLine": 8, + "endCharacter": 30, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 53, + "endLine": 69, + "endCharacter": 21, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 86, + "endLine": 22 + }, + { + "startLine": 50, + "startCharacter": 70, + "endLine": 4, + "endCharacter": 57, + "kind": "imports" + }, + { + "startLine": 62, + "endLine": 100, + "collapsedText": "randomString" + }, + { + "startLine": 81, + "endLine": 82, + "kind": "imports" + }, + { + "startLine": 62, + "endLine": 82, + "kind": "comment" + }, + { + "startLine": 45, + "startCharacter": 100, + "endLine": 65, + "endCharacter": 99 + }, + { + "startLine": 81, + "endLine": 84, + "endCharacter": 53, + "collapsedText": "randomString" + }, + { + "startLine": 58, + "endLine": 94 + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_2_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_2_ new file mode 100644 index 000000000..a6631335f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_2_ @@ -0,0 +1,303 @@ +[ + { + "startLine": 13, + "startCharacter": 34, + "endLine": 12 + }, + { + "startLine": 56, + "endLine": 97, + "endCharacter": 1, + "kind": "imports" + }, + { + "startLine": 3, + "endLine": 7, + "endCharacter": 7 + }, + { + "startLine": 75, + "startCharacter": 87, + "endLine": 11, + "endCharacter": 85, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 99, + "startCharacter": 67, + "endLine": 65, + "endCharacter": 72, + "collapsedText": "randomString" + }, + { + "startLine": 38, + "endLine": 12, + "endCharacter": 18, + "kind": "imports" + }, + { + "startLine": 28, + "endLine": 74, + "endCharacter": 75, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 80, + "startCharacter": 17, + "endLine": 59, + "kind": "imports" + }, + { + "startLine": 16, + "endLine": 28, + "endCharacter": 32, + "collapsedText": "randomString" + }, + { + "startLine": 71, + "endLine": 69, + "collapsedText": "randomString" + }, + { + "startLine": 85, + "endLine": 51, + "endCharacter": 26 + }, + { + "startLine": 46, + "startCharacter": 20, + "endLine": 44, + "endCharacter": 40, + "kind": "comment" + }, + { + "startLine": 54, + "startCharacter": 16, + "endLine": 42, + "endCharacter": 49 + }, + { + "startLine": 66, + "startCharacter": 73, + "endLine": 76, + "collapsedText": "randomString" + }, + { + "startLine": 50, + "startCharacter": 4, + "endLine": 63, + "endCharacter": 48, + "kind": "region" + }, + { + "startLine": 72, + "startCharacter": 72, + "endLine": 6, + "collapsedText": "randomString" + }, + { + "startLine": 59, + "startCharacter": 86, + "endLine": 50, + "collapsedText": "randomString" + }, + { + "startLine": 73, + "endLine": 60, + "endCharacter": 51, + "kind": "imports" + }, + { + "startLine": 68, + "endLine": 53, + "endCharacter": 97, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 13, + "startCharacter": 25, + "endLine": 78 + }, + { + "startLine": 43, + "startCharacter": 46, + "endLine": 80, + "collapsedText": "randomString" + }, + { + "startLine": 90, + "endLine": 42 + }, + { + "startLine": 99, + "endLine": 61, + "endCharacter": 2, + "kind": "imports" + }, + { + "startLine": 14, + "endLine": 64, + "collapsedText": "randomString" + }, + { + "startLine": 75, + "endLine": 63, + "endCharacter": 46 + }, + { + "startLine": 63, + "startCharacter": 68, + "endLine": 52, + "endCharacter": 67, + "collapsedText": "randomString" + }, + { + "startLine": 25, + "startCharacter": 76, + "endLine": 98, + "endCharacter": 73, + "collapsedText": "randomString" + }, + { + "startLine": 62, + "startCharacter": 68, + "endLine": 7, + "endCharacter": 62, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 8, + "startCharacter": 12, + "endLine": 16, + "collapsedText": "randomString" + }, + { + "startLine": 65, + "endLine": 30, + "endCharacter": 10, + "kind": "region" + }, + { + "startLine": 76, + "endLine": 35, + "endCharacter": 57, + "kind": "comment" + }, + { + "startLine": 14, + "startCharacter": 14, + "endLine": 88, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 61, + "startCharacter": 2, + "endLine": 93, + "endCharacter": 11 + }, + { + "startLine": 77, + "startCharacter": 73, + "endLine": 58, + "endCharacter": 84 + }, + { + "startLine": 55, + "startCharacter": 85, + "endLine": 26, + "endCharacter": 66, + "collapsedText": "randomString" + }, + { + "startLine": 35, + "startCharacter": 65, + "endLine": 97 + }, + { + "startLine": 53, + "endLine": 29, + "endCharacter": 35, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 78, + "startCharacter": 87, + "endLine": 59, + "endCharacter": 28 + }, + { + "startLine": 55, + "endLine": 64, + "endCharacter": 1, + "kind": "comment" + }, + { + "startLine": 29, + "startCharacter": 74, + "endLine": 49, + "endCharacter": 25, + "collapsedText": "randomString" + }, + { + "startLine": 91, + "startCharacter": 2, + "endLine": 73 + }, + { + "startLine": 28, + "endLine": 86, + "kind": "comment" + }, + { + "startLine": 72, + "startCharacter": 30, + "endLine": 78, + "endCharacter": 12 + }, + { + "startLine": 42, + "startCharacter": 66, + "endLine": 45 + }, + { + "startLine": 41, + "endLine": 61 + }, + { + "startLine": 41, + "startCharacter": 79, + "endLine": 34, + "collapsedText": "randomString" + }, + { + "startLine": 61, + "startCharacter": 70, + "endLine": 22, + "endCharacter": 2, + "kind": "imports" + }, + { + "startLine": 29, + "endLine": 90, + "endCharacter": 86, + "collapsedText": "randomString" + }, + { + "startLine": 75, + "startCharacter": 5, + "endLine": 4, + "endCharacter": 38 + }, + { + "startLine": 63, + "startCharacter": 79, + "endLine": 88, + "collapsedText": "randomString" + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_3_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_3_ new file mode 100644 index 000000000..2439d98bb --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_foldingRange__response_3_ @@ -0,0 +1,224 @@ +[ + { + "startLine": 30, + "startCharacter": 94, + "endLine": 87, + "kind": "comment" + }, + { + "startLine": 62, + "endLine": 41, + "endCharacter": 10 + }, + { + "startLine": 15, + "startCharacter": 93, + "endLine": 90, + "endCharacter": 86 + }, + { + "startLine": 94, + "endLine": 25, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 93, + "endLine": 52 + }, + { + "startLine": 22, + "endLine": 31 + }, + { + "startLine": 13, + "startCharacter": 37, + "endLine": 99, + "kind": "imports" + }, + { + "startLine": 71, + "endLine": 52, + "endCharacter": 84, + "collapsedText": "randomString" + }, + { + "startLine": 54, + "endLine": 88, + "endCharacter": 56, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 49, + "startCharacter": 85, + "endLine": 37, + "endCharacter": 83, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 99, + "startCharacter": 73, + "endLine": 4, + "endCharacter": 54, + "collapsedText": "randomString" + }, + { + "startLine": 33, + "endLine": 88, + "collapsedText": "randomString" + }, + { + "startLine": 24, + "endLine": 88, + "collapsedText": "randomString" + }, + { + "startLine": 92, + "endLine": 56, + "kind": "comment" + }, + { + "startLine": 43, + "startCharacter": 100, + "endLine": 75, + "endCharacter": 91, + "collapsedText": "randomString" + }, + { + "startLine": 4, + "startCharacter": 100, + "endLine": 61, + "endCharacter": 13, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 9, + "endLine": 45, + "kind": "region" + }, + { + "startLine": 30, + "startCharacter": 31, + "endLine": 2, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 63, + "endLine": 98, + "endCharacter": 10, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 2, + "endLine": 9, + "endCharacter": 21, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 91, + "endLine": 44, + "endCharacter": 36, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 75, + "endLine": 61, + "endCharacter": 34, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 79, + "endLine": 52, + "collapsedText": "randomString" + }, + { + "startLine": 11, + "endLine": 17 + }, + { + "startLine": 89, + "startCharacter": 89, + "endLine": 76, + "endCharacter": 46, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 98, + "startCharacter": 19, + "endLine": 84 + }, + { + "startLine": 47, + "endLine": 12, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 86, + "endLine": 71, + "endCharacter": 30, + "collapsedText": "randomString" + }, + { + "startLine": 93, + "startCharacter": 40, + "endLine": 31, + "endCharacter": 50 + }, + { + "startLine": 92, + "endLine": 92, + "endCharacter": 26 + }, + { + "startLine": 24, + "endLine": 63, + "endCharacter": 74, + "kind": "region" + }, + { + "startLine": 69, + "startCharacter": 3, + "endLine": 73, + "endCharacter": 29, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 73, + "startCharacter": 43, + "endLine": 57 + }, + { + "startLine": 90, + "endLine": 79, + "endCharacter": 76, + "kind": "comment" + }, + { + "startLine": 19, + "endLine": 43, + "kind": "comment" + }, + { + "startLine": 68, + "endLine": 46, + "endCharacter": 85 + }, + { + "startLine": 51, + "startCharacter": 92, + "endLine": 71, + "endCharacter": 96, + "kind": "region" + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_0_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_0_ new file mode 100644 index 000000000..07cc1e02f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_0_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": true + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 3, + "character": 77 + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_1_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_1_ new file mode 100644 index 000000000..0d28aabcf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_1_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file2" + }, + "position": { + "line": 60, + "character": 62 + }, + "workDoneToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_2_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_2_ new file mode 100644 index 000000000..9b0cc872f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_2_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 23, + "character": 38 + }, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_3_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_3_ new file mode 100644 index 000000000..4ec3f405e --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_3_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file2" + }, + "position": { + "line": 87, + "character": 58 + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_4_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_4_ new file mode 100644 index 000000000..88c25dec9 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__request_4_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 16, + "character": 79 + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__response_0_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__response_1_ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__response_1_ new file mode 100644 index 000000000..947736160 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/textDocument_references__response_1_ @@ -0,0 +1,457 @@ +[ + { + "uri": "file2", + "range": { + "start": { + "line": 39, + "character": 89 + }, + "end": { + "line": 3, + "character": 77 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 60, + "character": 62 + }, + "end": { + "line": 12, + "character": 99 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 10, + "character": 77 + }, + "end": { + "line": 53, + "character": 72 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 79, + "character": 62 + }, + "end": { + "line": 83, + "character": 23 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 90, + "character": 87 + }, + "end": { + "line": 58, + "character": 68 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 79, + "character": 65 + }, + "end": { + "line": 19, + "character": 22 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 71, + "character": 98 + }, + "end": { + "line": 36, + "character": 81 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 28, + "character": 62 + }, + "end": { + "line": 77, + "character": 20 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 49, + "character": 97 + }, + "end": { + "line": 100, + "character": 60 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 19, + "character": 33 + }, + "end": { + "line": 25, + "character": 94 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 8, + "character": 47 + }, + "end": { + "line": 45, + "character": 91 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 82, + "character": 61 + }, + "end": { + "line": 4, + "character": 97 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 96, + "character": 86 + }, + "end": { + "line": 29, + "character": 25 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 8, + "character": 77 + }, + "end": { + "line": 31, + "character": 35 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 21, + "character": 42 + }, + "end": { + "line": 13, + "character": 47 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 50, + "character": 13 + }, + "end": { + "line": 51, + "character": 55 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 32, + "character": 62 + }, + "end": { + "line": 86, + "character": 73 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 9, + "character": 93 + }, + "end": { + "line": 2, + "character": 43 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 38, + "character": 47 + }, + "end": { + "line": 82, + "character": 93 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 36, + "character": 64 + }, + "end": { + "line": 3, + "character": 79 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 42, + "character": 96 + }, + "end": { + "line": 25, + "character": 43 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 60, + "character": 4 + }, + "end": { + "line": 29, + "character": 32 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 84, + "character": 88 + }, + "end": { + "line": 72, + "character": 31 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 22, + "character": 52 + }, + "end": { + "line": 89, + "character": 51 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 26, + "character": 15 + }, + "end": { + "line": 67, + "character": 84 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 17, + "character": 36 + }, + "end": { + "line": 6, + "character": 50 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 73, + "character": 17 + }, + "end": { + "line": 91, + "character": 13 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 24, + "character": 87 + }, + "end": { + "line": 72, + "character": 61 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 56, + "character": 50 + }, + "end": { + "line": 21, + "character": 83 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 5, + "character": 75 + }, + "end": { + "line": 58, + "character": 83 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 19, + "character": 24 + }, + "end": { + "line": 71, + "character": 34 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 77, + "character": 45 + }, + "end": { + "line": 43, + "character": 24 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 41, + "character": 35 + }, + "end": { + "line": 80, + "character": 74 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 78, + "character": 91 + }, + "end": { + "line": 77, + "character": 59 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 73, + "character": 41 + }, + "end": { + "line": 4, + "character": 98 + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_0_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_0_ new file mode 100644 index 000000000..0584c5ad7 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_0_ @@ -0,0 +1,285 @@ +{ + "items": [ + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_1_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_1_ new file mode 100644 index 000000000..a54ccb4e7 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_1_ @@ -0,0 +1,252 @@ +{ + "items": [ + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_2_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_2_ new file mode 100644 index 000000000..4523198fc --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_2_ @@ -0,0 +1,7 @@ +{ + "items": [ + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_3_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_3_ new file mode 100644 index 000000000..099dea7c4 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_3_ @@ -0,0 +1,209 @@ +{ + "items": [ + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + } + ], + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_4_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_4_ new file mode 100644 index 000000000..fd8824ac0 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__request_4_ @@ -0,0 +1,40 @@ +{ + "items": [ + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + } + ], + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_0_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_0_ new file mode 100644 index 000000000..636081ff1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_0_ @@ -0,0 +1,123 @@ +[ + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_1_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_1_ new file mode 100644 index 000000000..e599026f0 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_1_ @@ -0,0 +1,151 @@ +[ + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_2_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_2_ new file mode 100644 index 000000000..15de30925 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_2_ @@ -0,0 +1,211 @@ +[ + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_3_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_3_ new file mode 100644 index 000000000..1b9b13d27 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_3_ @@ -0,0 +1,301 @@ +[ + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_4_ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_4_ new file mode 100644 index 000000000..f06525db3 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsJS/workspace_configuration__response_4_ @@ -0,0 +1,106 @@ +[ + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_0_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_0_ new file mode 100644 index 000000000..84f3e644c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_0_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_1_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_1_ new file mode 100644 index 000000000..214e636b1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_1_ @@ -0,0 +1,7 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": 25, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_2_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_2_ new file mode 100644 index 000000000..66f49eae1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_2_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file2" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_3_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_3_ new file mode 100644 index 000000000..2c7719bdf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_3_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file1" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_4_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_4_ new file mode 100644 index 000000000..8913ca17c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__request_4_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_0_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_1_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_1_ new file mode 100644 index 000000000..858b3e825 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_1_ @@ -0,0 +1,525 @@ +[ + { + "range": { + "start": { + "line": 62, + "character": 12 + }, + "end": { + "line": 99, + "character": 86 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 38, + "character": 10 + }, + "end": { + "line": 77, + "character": 53 + } + } + }, + { + "range": { + "start": { + "line": 87, + "character": 58 + }, + "end": { + "line": 68, + "character": 50 + } + }, + "target": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 16, + "character": 79 + }, + "end": { + "line": 65, + "character": 19 + } + } + }, + { + "range": { + "start": { + "line": 62, + "character": 77 + }, + "end": { + "line": 20, + "character": 15 + } + }, + "target": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 42, + "character": 49 + }, + "end": { + "line": 97, + "character": 100 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 45, + "character": 91 + }, + "end": { + "line": 25, + "character": 19 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 54, + "character": 82 + }, + "end": { + "line": 61, + "character": 4 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 77, + "character": 31 + }, + "end": { + "line": 35, + "character": 24 + } + }, + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 60, + "character": 21 + }, + "end": { + "line": 42, + "character": 13 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 62, + "character": 86 + }, + "end": { + "line": 73, + "character": 12 + } + }, + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 33, + "character": 9 + }, + "end": { + "line": 93, + "character": 2 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 64, + "character": 3 + }, + "end": { + "line": 79, + "character": 96 + } + }, + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 19, + "character": 42 + }, + "end": { + "line": 96, + "character": 25 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 72, + "character": 31 + }, + "end": { + "line": 73, + "character": 60 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 22, + "character": 52 + }, + "end": { + "line": 89, + "character": 51 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 6, + "character": 50 + }, + "end": { + "line": 50, + "character": 26 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 73, + "character": 17 + }, + "end": { + "line": 91, + "character": 13 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 83, + "character": 4 + }, + "end": { + "line": 24, + "character": 87 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 5, + "character": 75 + }, + "end": { + "line": 58, + "character": 83 + } + }, + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 24, + "character": 13 + }, + "end": { + "line": 19, + "character": 24 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 41, + "character": 35 + }, + "end": { + "line": 80, + "character": 74 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 98, + "character": 10 + }, + "end": { + "line": 78, + "character": 91 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 86, + "character": 76 + }, + "end": { + "line": 26, + "character": 2 + } + }, + "target": "randomString", + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 44, + "character": 95 + }, + "end": { + "line": 3, + "character": 2 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 63, + "character": 100 + }, + "end": { + "line": 86, + "character": 55 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": "I'm json lol" + }, + { + "range": { + "start": { + "line": 8, + "character": 30 + }, + "end": { + "line": 69, + "character": 24 + } + }, + "target": "randomString", + "tooltip": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + }, + { + "range": { + "start": { + "line": 21, + "character": 55 + }, + "end": { + "line": 13, + "character": 51 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 41, + "character": 22 + }, + "end": { + "line": 56, + "character": 66 + } + }, + "tooltip": "randomString", + "data": [ + "yo" + ] + }, + { + "range": { + "start": { + "line": 57, + "character": 35 + }, + "end": { + "line": 84, + "character": 45 + } + } + }, + { + "range": { + "start": { + "line": 72, + "character": 56 + }, + "end": { + "line": 39, + "character": 50 + } + }, + "tooltip": "randomString" + }, + { + "range": { + "start": { + "line": 4, + "character": 97 + }, + "end": { + "line": 83, + "character": 54 + } + } + }, + { + "range": { + "start": { + "line": 22, + "character": 62 + }, + "end": { + "line": 51, + "character": 48 + } + }, + "target": "randomString" + }, + { + "range": { + "start": { + "line": 99, + "character": 91 + }, + "end": { + "line": 40, + "character": 76 + } + } + }, + { + "range": { + "start": { + "line": 53, + "character": 17 + }, + "end": { + "line": 74, + "character": 27 + } + }, + "target": "randomString", + "data": { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_2_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_2_ new file mode 100644 index 000000000..5ab9317d5 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_documentLink__response_2_ @@ -0,0 +1,26 @@ +[ + { + "range": { + "start": { + "line": 52, + "character": 1 + }, + "end": { + "line": 58, + "character": 82 + } + } + }, + { + "range": { + "start": { + "line": 13, + "character": 34 + }, + "end": { + "line": 5, + "character": 12 + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_0_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_0_ new file mode 100644 index 000000000..84f3e644c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_0_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_1_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_1_ new file mode 100644 index 000000000..214e636b1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_1_ @@ -0,0 +1,7 @@ +{ + "textDocument": { + "uri": "file1" + }, + "workDoneToken": 25, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_2_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_2_ new file mode 100644 index 000000000..66f49eae1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_2_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file2" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_3_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_3_ new file mode 100644 index 000000000..2c7719bdf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_3_ @@ -0,0 +1,5 @@ +{ + "textDocument": { + "uri": "file1" + } +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_4_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_4_ new file mode 100644 index 000000000..8913ca17c --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__request_4_ @@ -0,0 +1,6 @@ +{ + "textDocument": { + "uri": "file1" + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_0_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_1_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_1_ new file mode 100644 index 000000000..d84dbcb35 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_1_ @@ -0,0 +1,216 @@ +[ + { + "startLine": 62, + "endLine": 99, + "endCharacter": 86, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 38, + "startCharacter": 10, + "endLine": 53 + }, + { + "startLine": 87, + "endLine": 68, + "endCharacter": 50, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 16, + "startCharacter": 79, + "endLine": 19 + }, + { + "startLine": 77, + "startCharacter": 20, + "endLine": 71, + "collapsedText": "randomString" + }, + { + "startLine": 42, + "startCharacter": 49, + "endLine": 100, + "endCharacter": 60 + }, + { + "startLine": 8, + "startCharacter": 47, + "endLine": 91, + "endCharacter": 25, + "kind": "imports" + }, + { + "startLine": 86, + "startCharacter": 29, + "endLine": 54, + "endCharacter": 82, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 90, + "endLine": 77, + "endCharacter": 31 + }, + { + "startLine": 50, + "startCharacter": 13, + "endLine": 55, + "endCharacter": 60, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 2, + "startCharacter": 43, + "endLine": 32, + "kind": "region" + }, + { + "startLine": 96, + "endLine": 47, + "endCharacter": 82, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 96, + "startCharacter": 25, + "endLine": 38, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 72, + "startCharacter": 31, + "endLine": 60, + "endCharacter": 4, + "kind": "imports" + }, + { + "startLine": 22, + "endLine": 89, + "endCharacter": 51 + }, + { + "startLine": 50, + "endLine": 26, + "endCharacter": 15, + "collapsedText": "randomString" + }, + { + "startLine": 73, + "startCharacter": 17, + "endLine": 13, + "endCharacter": 89 + }, + { + "startLine": 50, + "startCharacter": 21, + "endLine": 4, + "endCharacter": 24, + "kind": "imports" + }, + { + "startLine": 34, + "startCharacter": 40, + "endLine": 75, + "endCharacter": 58 + }, + { + "startLine": 77, + "startCharacter": 45, + "endLine": 24, + "endCharacter": 13, + "collapsedText": "randomString" + }, + { + "startLine": 59, + "startCharacter": 82, + "endLine": 35, + "collapsedText": "randomString" + }, + { + "startLine": 41, + "endLine": 98, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 14, + "endLine": 76, + "collapsedText": "randomString" + }, + { + "startLine": 43, + "startCharacter": 44, + "endLine": 3, + "collapsedText": "randomString" + }, + { + "startLine": 9, + "startCharacter": 23, + "endLine": 100, + "endCharacter": 86, + "kind": "imports" + }, + { + "startLine": 55, + "endLine": 8, + "endCharacter": 30, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 53, + "endLine": 69, + "endCharacter": 21, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 86, + "endLine": 22 + }, + { + "startLine": 50, + "startCharacter": 70, + "endLine": 4, + "endCharacter": 57, + "kind": "imports" + }, + { + "startLine": 62, + "endLine": 100, + "collapsedText": "randomString" + }, + { + "startLine": 81, + "endLine": 82, + "kind": "imports" + }, + { + "startLine": 62, + "endLine": 82, + "kind": "comment" + }, + { + "startLine": 45, + "startCharacter": 100, + "endLine": 65, + "endCharacter": 99 + }, + { + "startLine": 81, + "endLine": 84, + "endCharacter": 53, + "collapsedText": "randomString" + }, + { + "startLine": 58, + "endLine": 94 + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_2_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_2_ new file mode 100644 index 000000000..a6631335f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_2_ @@ -0,0 +1,303 @@ +[ + { + "startLine": 13, + "startCharacter": 34, + "endLine": 12 + }, + { + "startLine": 56, + "endLine": 97, + "endCharacter": 1, + "kind": "imports" + }, + { + "startLine": 3, + "endLine": 7, + "endCharacter": 7 + }, + { + "startLine": 75, + "startCharacter": 87, + "endLine": 11, + "endCharacter": 85, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 99, + "startCharacter": 67, + "endLine": 65, + "endCharacter": 72, + "collapsedText": "randomString" + }, + { + "startLine": 38, + "endLine": 12, + "endCharacter": 18, + "kind": "imports" + }, + { + "startLine": 28, + "endLine": 74, + "endCharacter": 75, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 80, + "startCharacter": 17, + "endLine": 59, + "kind": "imports" + }, + { + "startLine": 16, + "endLine": 28, + "endCharacter": 32, + "collapsedText": "randomString" + }, + { + "startLine": 71, + "endLine": 69, + "collapsedText": "randomString" + }, + { + "startLine": 85, + "endLine": 51, + "endCharacter": 26 + }, + { + "startLine": 46, + "startCharacter": 20, + "endLine": 44, + "endCharacter": 40, + "kind": "comment" + }, + { + "startLine": 54, + "startCharacter": 16, + "endLine": 42, + "endCharacter": 49 + }, + { + "startLine": 66, + "startCharacter": 73, + "endLine": 76, + "collapsedText": "randomString" + }, + { + "startLine": 50, + "startCharacter": 4, + "endLine": 63, + "endCharacter": 48, + "kind": "region" + }, + { + "startLine": 72, + "startCharacter": 72, + "endLine": 6, + "collapsedText": "randomString" + }, + { + "startLine": 59, + "startCharacter": 86, + "endLine": 50, + "collapsedText": "randomString" + }, + { + "startLine": 73, + "endLine": 60, + "endCharacter": 51, + "kind": "imports" + }, + { + "startLine": 68, + "endLine": 53, + "endCharacter": 97, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 13, + "startCharacter": 25, + "endLine": 78 + }, + { + "startLine": 43, + "startCharacter": 46, + "endLine": 80, + "collapsedText": "randomString" + }, + { + "startLine": 90, + "endLine": 42 + }, + { + "startLine": 99, + "endLine": 61, + "endCharacter": 2, + "kind": "imports" + }, + { + "startLine": 14, + "endLine": 64, + "collapsedText": "randomString" + }, + { + "startLine": 75, + "endLine": 63, + "endCharacter": 46 + }, + { + "startLine": 63, + "startCharacter": 68, + "endLine": 52, + "endCharacter": 67, + "collapsedText": "randomString" + }, + { + "startLine": 25, + "startCharacter": 76, + "endLine": 98, + "endCharacter": 73, + "collapsedText": "randomString" + }, + { + "startLine": 62, + "startCharacter": 68, + "endLine": 7, + "endCharacter": 62, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 8, + "startCharacter": 12, + "endLine": 16, + "collapsedText": "randomString" + }, + { + "startLine": 65, + "endLine": 30, + "endCharacter": 10, + "kind": "region" + }, + { + "startLine": 76, + "endLine": 35, + "endCharacter": 57, + "kind": "comment" + }, + { + "startLine": 14, + "startCharacter": 14, + "endLine": 88, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 61, + "startCharacter": 2, + "endLine": 93, + "endCharacter": 11 + }, + { + "startLine": 77, + "startCharacter": 73, + "endLine": 58, + "endCharacter": 84 + }, + { + "startLine": 55, + "startCharacter": 85, + "endLine": 26, + "endCharacter": 66, + "collapsedText": "randomString" + }, + { + "startLine": 35, + "startCharacter": 65, + "endLine": 97 + }, + { + "startLine": 53, + "endLine": 29, + "endCharacter": 35, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 78, + "startCharacter": 87, + "endLine": 59, + "endCharacter": 28 + }, + { + "startLine": 55, + "endLine": 64, + "endCharacter": 1, + "kind": "comment" + }, + { + "startLine": 29, + "startCharacter": 74, + "endLine": 49, + "endCharacter": 25, + "collapsedText": "randomString" + }, + { + "startLine": 91, + "startCharacter": 2, + "endLine": 73 + }, + { + "startLine": 28, + "endLine": 86, + "kind": "comment" + }, + { + "startLine": 72, + "startCharacter": 30, + "endLine": 78, + "endCharacter": 12 + }, + { + "startLine": 42, + "startCharacter": 66, + "endLine": 45 + }, + { + "startLine": 41, + "endLine": 61 + }, + { + "startLine": 41, + "startCharacter": 79, + "endLine": 34, + "collapsedText": "randomString" + }, + { + "startLine": 61, + "startCharacter": 70, + "endLine": 22, + "endCharacter": 2, + "kind": "imports" + }, + { + "startLine": 29, + "endLine": 90, + "endCharacter": 86, + "collapsedText": "randomString" + }, + { + "startLine": 75, + "startCharacter": 5, + "endLine": 4, + "endCharacter": 38 + }, + { + "startLine": 63, + "startCharacter": 79, + "endLine": 88, + "collapsedText": "randomString" + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_3_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_3_ new file mode 100644 index 000000000..2439d98bb --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_foldingRange__response_3_ @@ -0,0 +1,224 @@ +[ + { + "startLine": 30, + "startCharacter": 94, + "endLine": 87, + "kind": "comment" + }, + { + "startLine": 62, + "endLine": 41, + "endCharacter": 10 + }, + { + "startLine": 15, + "startCharacter": 93, + "endLine": 90, + "endCharacter": 86 + }, + { + "startLine": 94, + "endLine": 25, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 93, + "endLine": 52 + }, + { + "startLine": 22, + "endLine": 31 + }, + { + "startLine": 13, + "startCharacter": 37, + "endLine": 99, + "kind": "imports" + }, + { + "startLine": 71, + "endLine": 52, + "endCharacter": 84, + "collapsedText": "randomString" + }, + { + "startLine": 54, + "endLine": 88, + "endCharacter": 56, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 49, + "startCharacter": 85, + "endLine": 37, + "endCharacter": 83, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 99, + "startCharacter": 73, + "endLine": 4, + "endCharacter": 54, + "collapsedText": "randomString" + }, + { + "startLine": 33, + "endLine": 88, + "collapsedText": "randomString" + }, + { + "startLine": 24, + "endLine": 88, + "collapsedText": "randomString" + }, + { + "startLine": 92, + "endLine": 56, + "kind": "comment" + }, + { + "startLine": 43, + "startCharacter": 100, + "endLine": 75, + "endCharacter": 91, + "collapsedText": "randomString" + }, + { + "startLine": 4, + "startCharacter": 100, + "endLine": 61, + "endCharacter": 13, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 9, + "endLine": 45, + "kind": "region" + }, + { + "startLine": 30, + "startCharacter": 31, + "endLine": 2, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 63, + "endLine": 98, + "endCharacter": 10, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 2, + "endLine": 9, + "endCharacter": 21, + "kind": "comment", + "collapsedText": "randomString" + }, + { + "startLine": 91, + "endLine": 44, + "endCharacter": 36, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 75, + "endLine": 61, + "endCharacter": 34, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 79, + "endLine": 52, + "collapsedText": "randomString" + }, + { + "startLine": 11, + "endLine": 17 + }, + { + "startLine": 89, + "startCharacter": 89, + "endLine": 76, + "endCharacter": 46, + "kind": "region", + "collapsedText": "randomString" + }, + { + "startLine": 98, + "startCharacter": 19, + "endLine": 84 + }, + { + "startLine": 47, + "endLine": 12, + "kind": "region" + }, + { + "startLine": 62, + "startCharacter": 86, + "endLine": 71, + "endCharacter": 30, + "collapsedText": "randomString" + }, + { + "startLine": 93, + "startCharacter": 40, + "endLine": 31, + "endCharacter": 50 + }, + { + "startLine": 92, + "endLine": 92, + "endCharacter": 26 + }, + { + "startLine": 24, + "endLine": 63, + "endCharacter": 74, + "kind": "region" + }, + { + "startLine": 69, + "startCharacter": 3, + "endLine": 73, + "endCharacter": 29, + "kind": "imports", + "collapsedText": "randomString" + }, + { + "startLine": 73, + "startCharacter": 43, + "endLine": 57 + }, + { + "startLine": 90, + "endLine": 79, + "endCharacter": 76, + "kind": "comment" + }, + { + "startLine": 19, + "endLine": 43, + "kind": "comment" + }, + { + "startLine": 68, + "endLine": 46, + "endCharacter": 85 + }, + { + "startLine": 51, + "startCharacter": 92, + "endLine": 71, + "endCharacter": 96, + "kind": "region" + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_0_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_0_ new file mode 100644 index 000000000..07cc1e02f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_0_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": true + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 3, + "character": 77 + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_1_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_1_ new file mode 100644 index 000000000..0d28aabcf --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_1_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file2" + }, + "position": { + "line": 60, + "character": 62 + }, + "workDoneToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_2_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_2_ new file mode 100644 index 000000000..9b0cc872f --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_2_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 23, + "character": 38 + }, + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_3_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_3_ new file mode 100644 index 000000000..4ec3f405e --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_3_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file2" + }, + "position": { + "line": 87, + "character": 58 + }, + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_4_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_4_ new file mode 100644 index 000000000..88c25dec9 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__request_4_ @@ -0,0 +1,13 @@ +{ + "context": { + "includeDeclaration": false + }, + "textDocument": { + "uri": "file1" + }, + "position": { + "line": 16, + "character": 79 + }, + "workDoneToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__response_0_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__response_0_ new file mode 100644 index 000000000..ec747fa47 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__response_0_ @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__response_1_ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__response_1_ new file mode 100644 index 000000000..947736160 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/textDocument_references__response_1_ @@ -0,0 +1,457 @@ +[ + { + "uri": "file2", + "range": { + "start": { + "line": 39, + "character": 89 + }, + "end": { + "line": 3, + "character": 77 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 60, + "character": 62 + }, + "end": { + "line": 12, + "character": 99 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 10, + "character": 77 + }, + "end": { + "line": 53, + "character": 72 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 79, + "character": 62 + }, + "end": { + "line": 83, + "character": 23 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 90, + "character": 87 + }, + "end": { + "line": 58, + "character": 68 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 79, + "character": 65 + }, + "end": { + "line": 19, + "character": 22 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 71, + "character": 98 + }, + "end": { + "line": 36, + "character": 81 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 28, + "character": 62 + }, + "end": { + "line": 77, + "character": 20 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 49, + "character": 97 + }, + "end": { + "line": 100, + "character": 60 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 19, + "character": 33 + }, + "end": { + "line": 25, + "character": 94 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 8, + "character": 47 + }, + "end": { + "line": 45, + "character": 91 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 82, + "character": 61 + }, + "end": { + "line": 4, + "character": 97 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 96, + "character": 86 + }, + "end": { + "line": 29, + "character": 25 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 8, + "character": 77 + }, + "end": { + "line": 31, + "character": 35 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 21, + "character": 42 + }, + "end": { + "line": 13, + "character": 47 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 50, + "character": 13 + }, + "end": { + "line": 51, + "character": 55 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 32, + "character": 62 + }, + "end": { + "line": 86, + "character": 73 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 9, + "character": 93 + }, + "end": { + "line": 2, + "character": 43 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 38, + "character": 47 + }, + "end": { + "line": 82, + "character": 93 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 36, + "character": 64 + }, + "end": { + "line": 3, + "character": 79 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 42, + "character": 96 + }, + "end": { + "line": 25, + "character": 43 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 60, + "character": 4 + }, + "end": { + "line": 29, + "character": 32 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 84, + "character": 88 + }, + "end": { + "line": 72, + "character": 31 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 22, + "character": 52 + }, + "end": { + "line": 89, + "character": 51 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 26, + "character": 15 + }, + "end": { + "line": 67, + "character": 84 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 17, + "character": 36 + }, + "end": { + "line": 6, + "character": 50 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 73, + "character": 17 + }, + "end": { + "line": 91, + "character": 13 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 24, + "character": 87 + }, + "end": { + "line": 72, + "character": 61 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 56, + "character": 50 + }, + "end": { + "line": 21, + "character": 83 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 5, + "character": 75 + }, + "end": { + "line": 58, + "character": 83 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 19, + "character": 24 + }, + "end": { + "line": 71, + "character": 34 + } + } + }, + { + "uri": "file1", + "range": { + "start": { + "line": 77, + "character": 45 + }, + "end": { + "line": 43, + "character": 24 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 41, + "character": 35 + }, + "end": { + "line": 80, + "character": 74 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 78, + "character": 91 + }, + "end": { + "line": 77, + "character": 59 + } + } + }, + { + "uri": "file2", + "range": { + "start": { + "line": 73, + "character": 41 + }, + "end": { + "line": 4, + "character": 98 + } + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_0_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_0_ new file mode 100644 index 000000000..0584c5ad7 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_0_ @@ -0,0 +1,285 @@ +{ + "items": [ + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_1_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_1_ new file mode 100644 index 000000000..a54ccb4e7 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_1_ @@ -0,0 +1,252 @@ +{ + "items": [ + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_2_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_2_ new file mode 100644 index 000000000..4523198fc --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_2_ @@ -0,0 +1,7 @@ +{ + "items": [ + { + + } + ] +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_3_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_3_ new file mode 100644 index 000000000..099dea7c4 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_3_ @@ -0,0 +1,209 @@ +{ + "items": [ + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + + }, + { + + }, + { + + }, + { + "section": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + } + ], + "partialResultToken": "stringToken" +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_4_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_4_ new file mode 100644 index 000000000..fd8824ac0 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__request_4_ @@ -0,0 +1,40 @@ +{ + "items": [ + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString", + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + "section": "randomString" + }, + { + "scopeUri": "randomString" + }, + { + + } + ], + "partialResultToken": 25 +} \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_0_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_0_ new file mode 100644 index 000000000..636081ff1 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_0_ @@ -0,0 +1,123 @@ +[ + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_1_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_1_ new file mode 100644 index 000000000..e599026f0 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_1_ @@ -0,0 +1,151 @@ +[ + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_2_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_2_ new file mode 100644 index 000000000..15de30925 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_2_ @@ -0,0 +1,211 @@ +[ + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + } +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_3_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_3_ new file mode 100644 index 000000000..1b9b13d27 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_3_ @@ -0,0 +1,301 @@ +[ + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + "I'm json lol", + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + "I'm json lol", + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_4_ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_4_ new file mode 100644 index 000000000..f06525db3 --- /dev/null +++ b/modules/tests/src/test/resources/snapshots/testsNative/workspace_configuration__response_4_ @@ -0,0 +1,106 @@ +[ + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + "I'm json lol", + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ], + [ + "yo" + ], + [ + "yo" + ], + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + { + "a": "what", + "test": { + "b": [ + 1 + ] + } + }, + [ + "yo" + ] +] \ No newline at end of file diff --git a/modules/tests/src/test/scala/CodecTest.scala b/modules/tests/src/test/scala/CodecTest.scala index cdbd586fb..b5e881329 100644 --- a/modules/tests/src/test/scala/CodecTest.scala +++ b/modules/tests/src/test/scala/CodecTest.scala @@ -10,64 +10,66 @@ import langoustine.lsp.all.* import cats.Monad import jsonrpclib.* +import org.scalacheck.* +import org.scalacheck.rng.Seed -object CodecTest extends weaver.FunSuite: - test("documentSymbol codec") { - - val out1 = Opt( - Vector( - SymbolInformation( - deprecated = Opt(true), - name = "Howdy1", - kind = SymbolKind.Method, - location = Location( - DocumentUri(""), - Range(Position.documentBeginning, Position.documentBeginning) - ) - ) - ) - ) - - val out2 = Opt( - Vector( - DocumentSymbol( - name = "Howdy", - kind = SymbolKind.Class, - range = Range( - Position.documentBeginning, - Position.documentBeginning - ), - selectionRange = - Range(Position.documentBeginning, Position.documentBeginning) - ) - ) - ) +object CodecTest extends weaver.FunSuite, WeaverSnapshotsIntegration: - val unionWriter = textDocument.documentSymbol.outputWriter - val unionReader = textDocument.documentSymbol.outputReader + given Arbitrary[String] = Arbitrary(Gen.const("randomString")) - import upickle.default.* + val SEED = 120312937L - val written1 = write(out1)(using unionWriter) - val written2 = write(out2)(using unionWriter) + requestSnapshotTest(langoustine.lsp.requests.textDocument.documentLink) + requestSnapshotTest(langoustine.lsp.requests.textDocument.foldingRange) + requestSnapshotTest(langoustine.lsp.requests.workspace.configuration) + requestSnapshotTest(langoustine.lsp.requests.textDocument.references) + // requestSnapshotTest(langoustine.lsp.requests.textDocument.rename) - val read1 = read(written1)(using unionReader) - val read2 = read(written2)(using unionReader) + def requestSnapshotTest[T <: LSPRequest](x: T)(using + arbReq: Arbitrary[x.In], + arbResp: Arbitrary[x.Out] + ) = + def safeToString[T](x: T | Null) = + x match + case Opt.empty => "Opt.empty" + case _ => x.toString() - expect.same(read1, out1) and - expect.same(read2, out2) - } + def sampleN[T](n: Int, arb: Arbitrary[T]) = + Gen + .listOfN(n, arb.arbitrary) + .pureApply(Gen.Parameters.default, Seed(SEED)) - test("workspace/configuration codec (and types construction)") { - val req = workspace.configuration - val in = workspace.configuration.WorkspaceConfigurationInput( - items = Vector(ConfigurationItem(Opt("hello"))), - partialResultToken = Opt(ProgressToken("helllooooo")) - ) + test(x.requestMethod + " request snapshot") { + val bld = StringBuilder() + val requests = sampleN(5, arbReq).distinct - import req.WorkspaceConfigurationInput + forEach(requests.zipWithIndex): (request, idx) => + val json = write(request, indent = 2) + val printed = safeToString(request) + val snapshotName = x.requestMethod + s": request($idx)" + + expectSnapshot(snapshotName, json) && + assertSnapshotContents( + snapshotName, + contents => expect.same(read[x.In](contents), request) + ) + } - expect.same(read[WorkspaceConfigurationInput](write(in)), in) + test(x.requestMethod + " response snapshot") { + val bld = StringBuilder() + val requests = sampleN(5, arbResp).distinct + + forEach(requests.zipWithIndex): (response, idx) => + val json = write(response, indent = 2) + val printed = safeToString(response) + val snapshotName = x.requestMethod + s": response($idx)" + + expectSnapshot(snapshotName, json) && + assertSnapshotContents( + snapshotName, + contents => expect.same(read[x.Out](contents), response) + ) + } + end requestSnapshotTest - } end CodecTest diff --git a/modules/tests/src/test/scala/DeriveScalacheckArbitrary.scala b/modules/tests/src/test/scala/DeriveScalacheckArbitrary.scala new file mode 100644 index 000000000..e91267f36 --- /dev/null +++ b/modules/tests/src/test/scala/DeriveScalacheckArbitrary.scala @@ -0,0 +1,77 @@ +package tests.core + +import langoustine.lsp.runtime.* +import langoustine.lsp.Bijection +import langoustine.lsp.aliases.* +import langoustine.lsp.structures.* + +import org.scalacheck.* +import shapeless3.deriving.* + +given [A](using inst: => K0.ProductInstances[Arbitrary, A]): Arbitrary[A] = + val x: Gen[A] = Gen.delay( + inst.constructA([t] => (ma: Arbitrary[t]) => ma.arbitrary)( + [a] => (a: a) => Gen.const(a), + [a, b] => (a: Gen[a], f: a => b) => a.map(f), + [a, b] => (f: Gen[a => b], a: Gen[a]) => a.flatMap(a => f.map(_.apply(a))) + ) + ) + + Arbitrary.apply(x) +end given + +given optGen[A](using inst: => Arbitrary[A]): Arbitrary[Opt[A]] = Arbitrary( + Gen + .oneOf(true, false) + .flatMap: + case true => inst.arbitrary.map(Opt.apply) + case false => Gen.const(Opt.empty) +) + +given Arbitrary[DocumentUri] = Arbitrary( + Gen.oneOf("file1", "file2").map(DocumentUri.apply(_)) +) + +given Arbitrary[uinteger] = Arbitrary(Gen.posNum[Int].map(uinteger.apply)) + +given deriveStringEnum[A](using bi: Bijection[A, String]): Arbitrary[A] = + Arbitrary(Gen.oneOf(bi.domain)) + +given deriveUintegerEnum[A](using bi: Bijection[A, uinteger]): Arbitrary[A] = + Arbitrary(Gen.oneOf(bi.domain)) + +given deriveIntegerEnum[A](using bi: Bijection[A, Int]): Arbitrary[A] = + Arbitrary(Gen.oneOf(bi.domain)) + +given Arbitrary[ProgressToken] = + Arbitrary: + for + someString <- Gen.const("stringToken").map(ProgressToken.apply) + someInt <- Gen.const(25).map(ProgressToken.apply) + + progressToken <- Gen.oneOf(someString, someInt) + yield progressToken + +given Arbitrary[ujson.Value] = + import ujson.* + Arbitrary( + Gen.oneOf( + Str("I'm json lol"), + Arr(Str("yo")), + Obj("a" -> Str("what"), "test" -> Obj("b" -> Arr(Num(1)))) + ) + ) +end given + +given Arbitrary[Vector[SymbolInformation] | Vector[DocumentSymbol]] = + val l1 = + Gen.listOfN(5, Arbitrary.arbitrary[SymbolInformation]).map(_.toVector) + val l2 = Gen.listOfN(5, Arbitrary.arbitrary[DocumentSymbol]).map(_.toVector) + val either: Gen[Vector[SymbolInformation] | Vector[DocumentSymbol]] = + Gen.oneOf(l1, l2) + Arbitrary(either) + +import io.github.irevive.union.derivation.{IsUnion, UnionDerivation} + +inline given derivedUnion[A](using IsUnion[A]): Arbitrary[A] = + UnionDerivation.derive[Arbitrary, A] diff --git a/modules/tests/src/test/scala/SnapshotsIntegration.scala b/modules/tests/src/test/scala/SnapshotsIntegration.scala new file mode 100644 index 000000000..9277f91db --- /dev/null +++ b/modules/tests/src/test/scala/SnapshotsIntegration.scala @@ -0,0 +1,38 @@ +package tests.core + +import weaver.Expectations + +// This is a sample integration for Weaver +trait WeaverSnapshotsIntegration: + self: weaver.FunSuite => + + def expectSnapshot(name: String, contents: String): Expectations = + Snapshots.read(name) match + case None => + Snapshots.write(name, contents) + success + + case Some(value) => + if contents != value then + if !Snapshots.forceOverwrite then + Snapshots.recordChanges(name, contents, "") + failure("Snapshots had different contents") + else + Snapshots.write(name, contents) + success + else + Snapshots.clearChanges(name) + success + + def assertSnapshotContents( + name: String, + check: String => Expectations + ): Expectations = + Snapshots.read(name) match + case None => + failure(s"Snapshot $name not found") + + case Some(value) => + check(value) + +end WeaverSnapshotsIntegration diff --git a/project/build.properties b/project/build.properties index 40b3b8e7b..04267b14a 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.0 +sbt.version=1.9.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index c593781b4..8d0b812da 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,14 +1,15 @@ -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") -addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.0") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") -addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.1") -addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.15") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7") -addSbtPlugin("com.github.reibitto" % "sbt-welcome" % "0.2.2") -addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16") -addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1") -addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") +addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12") +addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.0") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0") +addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.9.1") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.9.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7") +addSbtPlugin("com.github.reibitto" % "sbt-welcome" % "0.2.2") +addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16") +addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1") +addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") +addSbtPlugin("com.indoorvivants.snapshots" % "sbt-snapshots" % "0.0.5")