Initial commit

This commit is contained in:
Peter Niederwieser
2016-01-19 14:51:19 +01:00
committed by Dan Chao
commit ecad035dca
2972 changed files with 211653 additions and 0 deletions
@@ -0,0 +1 @@
someProperty = "hi"
@@ -0,0 +1,6 @@
–– Pkl Error ––
Expected an annotation class.
x | @NoAnn
^^^^^
at annotation2 (file:///$snippetsDir/input/annotation/annotation2.pkl)
@@ -0,0 +1,6 @@
–– Pkl Error ––
Expected an annotation class.
x | @NoAnn
^^^^^
at annotation3 (file:///$snippetsDir/input/annotation/annotation3.pkl)
@@ -0,0 +1,6 @@
–– Pkl Error ––
Expected an annotation class.
x | @Mapping {
^^^^^^^
at annotation4 (file:///$snippetsDir/input/annotation/annotation4.pkl)
@@ -0,0 +1,6 @@
–– Pkl Error ––
Expected `integer` to be a type, but it is not.
x | @integer someProperty: String = "hi"
^^^^^^^
at annotation5 (file:///$snippetsDir/input/annotation/annotation5.pkl)
@@ -0,0 +1,6 @@
–– Pkl Error ––
Expected an annotation class.
x | @Int someProperty: String = "hi"
^^^
at annotation6 (file:///$snippetsDir/input/annotation/annotation6.pkl)
@@ -0,0 +1,6 @@
–– Pkl Error ––
Expected `myAnn` to be a type, but it is not.
x | @myAnn
^^^^^
at annotationIsNotExpression (file:///$snippetsDir/input/annotation/annotationIsNotExpression.pkl)
@@ -0,0 +1,6 @@
–– Pkl Error ––
Expected an annotation class.
x | @Ann1|Ann2
^^^^^^^^^
at annotationIsNotExpression2 (file:///$snippetsDir/input/annotation/annotationIsNotExpression2.pkl)
@@ -0,0 +1,24 @@
res1 = 100001
res1b = List(1001, 2001, 3001)
res2 = 200002
res2b = List(4002, 5002, 6002)
res3 = 300101
res3b = List(7101, 8101, 9101)
res4 = 400201
res4b = List(10201, 11201, 12201)
res5 = 500202
res5b = List(13202, 14202, 15202)
res6 = 600301
res6b = List(16301, 17301, 18301)
res7 = 700202
res7b = List(19202, 20202, 21202)
pkl: WARN: Method `deprecated1#f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#A.f` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#A.f` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#B.f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#B.f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#C.f1` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#C.f1` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#B.f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#B.f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
@@ -0,0 +1,26 @@
res1 = -800001
res1b = List(-22001, -23001, -24001)
res2 = 900002
res2b = List(25002, 26002, 27002)
res3 = 300101
res3b = List(7101, 8101, 9101)
res4 = 400201
res4b = List(10201, 11201, 12201)
res5 = 500202
res5b = List(13202, 14202, 15202)
res6 = 600301
res6b = List(16301, 17301, 18301)
res7 = 700202
res7b = List(19202, 20202, 21202)
pkl: WARN: Method `deprecated2#f1` is deprecated (file:///$snippetsDir/input/annotation/deprecated2.pkl)
pkl: WARN: Method `deprecated2#f1` is deprecated (file:///$snippetsDir/input/annotation/deprecated2.pkl)
pkl: WARN: Method `deprecated1#f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated2.pkl)
pkl: WARN: Method `deprecated1#f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated2.pkl)
pkl: WARN: Method `deprecated1#A.f` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#A.f` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#B.f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#B.f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#C.f1` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#C.f1` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#B.f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
pkl: WARN: Method `deprecated1#B.f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated1.pkl)
@@ -0,0 +1,14 @@
res1 = 1000001
res1b = List(28001, 29001, 30001)
res2 = 1100002
res2b = List(31002, 32002, 33002)
res3 = -1200001
res3b = List(-34001, -35001, -36001)
res4 = 1300002
res4b = List(37002, 38002, 39002)
pkl: WARN: Method `deprecated1#f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated3.pkl)
pkl: WARN: Method `deprecated1#f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated3.pkl)
pkl: WARN: Method `deprecated2#f1` is deprecated (file:///$snippetsDir/input/annotation/deprecated3.pkl)
pkl: WARN: Method `deprecated2#f1` is deprecated (file:///$snippetsDir/input/annotation/deprecated3.pkl)
pkl: WARN: Method `deprecated1#f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated3.pkl)
pkl: WARN: Method `deprecated1#f2` is deprecated (file:///$snippetsDir/input/annotation/deprecated3.pkl)
@@ -0,0 +1,8 @@
shouldWarnForFirstCallToFooFromBar = 0
shouldNotWarnForRepeatedCallToFooFromBar1 = 0
shouldNotWarnForRepeatedCallToFooFromBar2 = 0
shouldWarnForDirectCallToFoo = 0
shouldWarnForRepeatedDirectCallToFoo = 0
pkl: WARN: Method `deprecatedNoRepeatedWarnings#foo` is deprecated (file:///$snippetsDir/input/annotation/deprecatedNoRepeatedWarnings.pkl)
pkl: WARN: Method `deprecatedNoRepeatedWarnings#foo` is deprecated (file:///$snippetsDir/input/annotation/deprecatedNoRepeatedWarnings.pkl)
pkl: WARN: Method `deprecatedNoRepeatedWarnings#foo` is deprecated (file:///$snippetsDir/input/annotation/deprecatedNoRepeatedWarnings.pkl)
@@ -0,0 +1,24 @@
res1 = 100001
res1b = List(1001, 2001, 3001)
res2 = 200002
res2b = List(4002, 5002, 6002)
res3 = 300101
res3b = List(7101, 8101, 9101)
res4 = 400201
res4b = List(10201, 11201, 12201)
res5 = 500202
res5b = List(13202, 14202, 15202)
res6 = 600301
res6b = List(16301, 17301, 18301)
res7 = 700202
res7b = List(19202, 20202, 21202)
pkl: WARN: Method `deprecatedWithMessage1#f2` is deprecated: use f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#f2` is deprecated: use f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#A.f` is deprecated: use B.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#A.f` is deprecated: use B.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#B.f2` is deprecated: use this.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#B.f2` is deprecated: use this.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#C.f1` is deprecated: avoid using C.f1 (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#C.f1` is deprecated: avoid using C.f1 (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#B.f2` is deprecated: use this.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#B.f2` is deprecated: use this.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
@@ -0,0 +1,26 @@
res1 = -800001
res1b = List(-22001, -23001, -24001)
res2 = 900002
res2b = List(25002, 26002, 27002)
res3 = 300101
res3b = List(7101, 8101, 9101)
res4 = 400201
res4b = List(10201, 11201, 12201)
res5 = 500202
res5b = List(13202, 14202, 15202)
res6 = 600301
res6b = List(16301, 17301, 18301)
res7 = 700202
res7b = List(19202, 20202, 21202)
pkl: WARN: Method `deprecatedWithMessage2#f1` is deprecated: avoid using f1 (file:///$snippetsDir/input/annotation/deprecatedWithMessage2.pkl)
pkl: WARN: Method `deprecatedWithMessage2#f1` is deprecated: avoid using f1 (file:///$snippetsDir/input/annotation/deprecatedWithMessage2.pkl)
pkl: WARN: Method `deprecatedWithMessage1#f2` is deprecated: use f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage2.pkl)
pkl: WARN: Method `deprecatedWithMessage1#f2` is deprecated: use f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage2.pkl)
pkl: WARN: Method `deprecatedWithMessage1#A.f` is deprecated: use B.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#A.f` is deprecated: use B.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#B.f2` is deprecated: use this.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#B.f2` is deprecated: use this.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#C.f1` is deprecated: avoid using C.f1 (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#C.f1` is deprecated: avoid using C.f1 (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#B.f2` is deprecated: use this.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
pkl: WARN: Method `deprecatedWithMessage1#B.f2` is deprecated: use this.f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage1.pkl)
@@ -0,0 +1,14 @@
res1 = 1000001
res1b = List(28001, 29001, 30001)
res2 = 1100002
res2b = List(31002, 32002, 33002)
res3 = -1200001
res3b = List(-34001, -35001, -36001)
res4 = 1300002
res4b = List(37002, 38002, 39002)
pkl: WARN: Method `deprecatedWithMessage1#f2` is deprecated: use f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage3.pkl)
pkl: WARN: Method `deprecatedWithMessage1#f2` is deprecated: use f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage3.pkl)
pkl: WARN: Method `deprecatedWithMessage2#f1` is deprecated: avoid using f1 (file:///$snippetsDir/input/annotation/deprecatedWithMessage3.pkl)
pkl: WARN: Method `deprecatedWithMessage2#f1` is deprecated: avoid using f1 (file:///$snippetsDir/input/annotation/deprecatedWithMessage3.pkl)
pkl: WARN: Method `deprecatedWithMessage1#f2` is deprecated: use f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage3.pkl)
pkl: WARN: Method `deprecatedWithMessage1#f2` is deprecated: use f1 instead (file:///$snippetsDir/input/annotation/deprecatedWithMessage3.pkl)
@@ -0,0 +1,7 @@
barCall = 42
bazCall = "baz was called"
quxCall = -1
barCall2ShouldNotWarn = 42
bazCall2ShouldNotWarn = "baz was called"
pkl: WARN: Method `deprecationSuperMethod#Foo.bar` is deprecated (file:///$snippetsDir/input/annotation/deprecationSuperMethod.pkl)
pkl: WARN: Method `deprecationSuperMethod#Foo.baz` is deprecated: Use only Foo#qux (file:///$snippetsDir/input/annotation/deprecationSuperMethod.pkl)
@@ -0,0 +1,22 @@
examples {
["text"] {
""
"The quick brown fox jumps over the lazy dog."
}
["md5"] {
"d41d8cd98f00b204e9800998ecf8427e"
"e4d909c290d0fb1ca068ffaddf22cbd0"
}
["sha1"] {
"da39a3ee5e6b4b0d3255bfef95601890afd80709"
"408d94384216f890ff7a0c3528e8bed1e0b01621"
}
["sha256"] {
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
"ef537f25c895bfa782526529a9b63d97aa631564d5d789c2b765448c8635fb6c"
}
["sha256Int"] {
1449310910991872227
-6359199461968751633
}
}
@@ -0,0 +1,46 @@
examples {
["getClass()"] {
"Int"
"Float"
"Boolean"
"String"
"Duration"
"DataSize"
"List"
"Map"
"Listing"
"Mapping"
"Dynamic"
"Person"
"Class"
"Null"
"Pair"
"ModuleClass"
}
["ifNonNull"] {
10
"foo"
null
null
null
null
}
["toString()"] {
"Pigeon"
"42"
"1.23"
"true"
"1.23.ns"
"1.23.mb"
"Pair(1, 2)"
"List(1, 2, 3)"
"Set(1, 2, 3)"
"Map(1, 2, 3, 4)"
"new Listing { 1; 2; 3 }"
"new Mapping { [\"Pigeon\"] = 42; [\"Barn Owl\"] = 21 }"
"new Dynamic { name = \"Pigeon\"; age = 42 }"
"new Person2 { name = \"Pigeon\"; age = 42 }"
"null"
"null"
}
}
@@ -0,0 +1,6 @@
foo {
"Unconverted class: anyConverter#User"
"Dog(5)"
"Unconverted class: anyConverter#Env"
"42"
}
@@ -0,0 +1,24 @@
examples {
["TODO()"] {
"TODO"
}
["Undefined()"] {
"Undefined value."
"Undefined value."
}
["Regex"] {
Regex("")
Regex(#"[ab]\s+"#)
"Syntax error in regex `(`: Unclosed group near index 1 ("
}
["Pair()"] {
Pair(1, "two")
}
["NaN"] {
NaN
}
["Infinity"] {
Infinity
-Infinity
}
}
@@ -0,0 +1,35 @@
facts {
["run microbenchmark"] {
true
true
true
true
true
true
true
}
["run output benchmark (in verbose mode)"] {
true
true
true
true
true
true
true
true
}
["run parser benchmark"] {
true
true
true
true
true
true
true
}
["evaluate entire benchmark module"] {
true
true
true
}
}
@@ -0,0 +1,138 @@
facts {
["isPositive"] {
true
true
true
true
true
true
true
true
}
["isBinaryUnit"] {
true
true
true
true
true
true
true
true
true
true
true
}
["isDecimalUnit"] {
true
true
true
true
true
true
true
true
true
true
true
}
["isBetween"] {
true
true
true
true
true
true
true
true
true
true
true
true
true
true
}
}
examples {
["value"] {
1
2.2
3
4.4
5
6.6
7
8.8
9
10.1
11
List(1, 2.2, 3)
}
["unit"] {
"b"
"kb"
"kib"
"mb"
"mib"
"gb"
"gib"
"tb"
"tib"
"pb"
"pib"
}
["toUnit()"] {
1.pb
1000.tb
1000000.gb
1000000000.mb
1000000000000.kb
1000000000000000.b
1.pb
1000.tb
1000000.gb
1000000000.mb
1000000000000.kb
1000000000000000.b
1.pib
1024.tib
1048576.gib
1073741824.mib
1099511627776.kib
1125899906842624.b
1.pib
1024.tib
1048576.gib
1073741824.mib
1099511627776.kib
1125899906842624.b
"Expected value of type `\"b\"|\"kb\"|\"kib\"|\"mb\"|\"mib\"|\"gb\"|\"gib\"|\"tb\"|\"tib\"|\"pb\"|\"pib\"`, but got `\"foo\"`."
500000.kb
0.46566128730773926.gib
}
["toBinaryUnit()"] {
0.9094947017729282.pib
0.9313225746154785.tib
0.95367431640625.gib
0.9765625.mib
1.kib
1.024.b
1.024.pib
1.024.tib
1.024.gib
1.024.mib
1.024.kib
}
["toDecimalUnit()"] {
1.pb
1.tb
1.gb
1.mb
1.kb
1.b
1.125899906842624.pb
1.099511627776.tb
1.073741824.gb
1.048576.mb
1.024.kb
}
}
@@ -0,0 +1 @@
res1 = "No descendent path exists between modules `file:///$snippetsDir/input/api/dir1/dir2/relativePathTo.pkl` and `file:///$snippetsDir/input/api/module.pkl`."
@@ -0,0 +1,94 @@
facts {
["isPositive"] {
true
true
true
true
true
true
true
true
}
["isBetween"] {
true
true
true
true
true
true
true
true
true
true
true
true
true
true
}
}
examples {
["value"] {
1
2.2
3
4.4
5
6.6
7
List(1, 2.2, 3)
}
["unit"] {
"ns"
"us"
"ms"
"s"
"min"
"h"
"d"
}
["isoString"] {
"PT0.000000001S"
"PT0.0000022S"
"PT0.003S"
"PT4.4S"
"PT5M"
"PT6H36M"
"PT168H"
"PT2.0005S"
"PT0S"
"PT0S"
"PT0S"
"PT0S"
"PT0S"
"PT0S"
"PT0S"
"PT0S"
"PT0S"
"PT2400H"
"-PT10.001S"
"-PT3H6M"
"PT9223372036854775807H7M8S"
"Cannot convert duration `NaN.s` to ISO 8601 duration."
"Cannot convert duration `Infinity.s` to ISO 8601 duration."
"Cannot convert duration `-Infinity.s` to ISO 8601 duration."
"Cannot convert duration `Infinity.s` to ISO 8601 duration."
}
["toUnit()"] {
1.d
24.h
1440.min
86400.s
86400000.ms
86400000000.us
86400000000000.ns
1.d
24.h
1440.min
86400.s
86400000000.us
86400000000000.ns
1800.s
0.5.h
"Expected value of type `\"ns\"|\"us\"|\"ms\"|\"s\"|\"min\"|\"h\"|\"d\"`, but got `\"foo\"`."
}
}
@@ -0,0 +1,61 @@
facts {
["length()"] {
true
true
true
true
true
true
}
}
examples {
["getProperty()"] {
"Pigeon"
"Pigeon"
42
"Cannot find property `other` in object of type `Dynamic`."
}
["getPropertyOrNull()"] {
"Pigeon"
"Pigeon"
42
null
}
["hasProperty()"] {
true
true
true
false
true
false
true
}
["toMap()"] {
Map("name", "Pigeon", "age", 42)
Map("prop1", "prop1", "prop2", "prop2", "name", "Pigeon", "age", 42)
Map("prop1", "prop1", "prop2", "prop2", "name", "Pigeon", "age", 42)
}
["toList()"] {
List()
List("one", "two")
List("one one", "two two")
}
["toTyped()"] {
new {
name = "Pigeon"
age = 42
}
new {
name = "Pigeon"
age = 43
}
new {
name = "Default"
age = 42
}
"Pigeon"
"Tried to read property `age` but its value is undefined."
"Class `Pair` is not a subtype of `Typed`."
"Cannot instantiate abstract class `ValueRenderer`."
}
}
@@ -0,0 +1,197 @@
facts {
["isNaN"] {
true
true
true
true
true
}
["isFinite"] {
true
true
true
true
true
}
["isInfinite"] {
true
true
true
true
true
}
["isPositive"] {
true
true
true
true
true
true
true
}
["isBetween()"] {
true
true
true
true
true
true
true
true
true
}
["isNonZero"] {
true
true
true
true
true
true
}
["toDuration()"] {
true
true
}
["toDataSize()"] {
true
true
}
}
examples {
["sign"] {
1.0
-1.0
0.0
-0.0
NaN
1.0
-1.0
}
["abs"] {
2.34
2.34
0.0
0.0
NaN
Infinity
Infinity
}
["ceil"] {
3.0
3.0
-2.0
-2.0
0.0
-0.0
NaN
Infinity
-Infinity
}
["floor"] {
2.0
2.0
-3.0
-3.0
0.0
-0.0
NaN
Infinity
-Infinity
}
["round()"] {
2.0
3.0
-2.0
-3.0
0.0
-0.0
NaN
Infinity
-Infinity
}
["truncate()"] {
2.0
2.0
-2.0
-2.0
0.0
-0.0
NaN
Infinity
-Infinity
}
["toInt()"] {
2
2
-2
-2
0
0
"Cannot convert non-finite Float `Infinity` to Int."
"Cannot convert non-finite Float `-Infinity` to Int."
"Cannot convert non-finite Float `NaN` to Int."
"Cannot convert Float `9.223372036854776E18` to Int because it is too large."
}
["toFloat()"] {
2.34
2.9
-2.34
-2.9
0.0
-0.0
NaN
Infinity
-Infinity
}
["toString()"] {
"2.34"
"2.9"
"-2.34"
"-2.9"
"0.0"
"-0.0"
"NaN"
"Infinity"
"-Infinity"
}
["toFixed()"] {
"2"
"3"
"-2"
"-3"
"0"
"-0"
"NaN"
"Infinity"
"-Infinity"
"2.3"
"2.90"
"-2.340"
"-2.9000"
"0.00000"
"-0.000000"
"NaN"
"Infinity"
"-Infinity"
"1.2"
"-1.23"
"1.235"
"-1.2346"
"1.23457"
"-1.234568"
"1.2345679"
"-1.23456789"
"1.234567890"
"123456789.1"
"123456789.12"
"123456789.123"
"123456789.1235"
"123456789.12346"
"123456789.123457"
"123456789.1234568"
"123456789.12345679"
"123456789.123456790"
"Type constraint `this.isBetween(0, 20)` violated. Value: -1"
"Type constraint `this.isBetween(0, 20)` violated. Value: 21"
}
}
@@ -0,0 +1,179 @@
facts {
["isEven"] {
true
true
true
}
["isOdd"] {
true
true
true
}
["isNaN"] {
true
true
}
["isFinite"] {
true
true
}
["isInfinite"] {
true
true
}
["isPositive"] {
true
true
true
}
["isBetween()"] {
true
true
true
true
true
true
true
true
true
true
}
["isNonZero"] {
true
true
true
}
["toDuration()"] {
true
true
}
["toDataSize()"] {
true
true
}
}
examples {
["sign"] {
1
-1
0
0
}
["abs"] {
123
123
0
0
}
["ceil"] {
123
-123
0
0
}
["floor"] {
123
-123
0
0
}
["toRadixString()"] {
"7b"
"1111011"
"3o"
"-7b"
"-1111011"
"-3o"
"0"
"0"
"0"
"0"
"0"
"0"
"Type constraint `this.isBetween(2, 36)` violated. Value: -1"
"Type constraint `this.isBetween(2, 36)` violated. Value: 64"
}
["round()"] {
123
-123
0
0
}
["truncate()"] {
123
-123
0
0
}
["toInt()"] {
123
-123
0
0
}
["toFloat()"] {
123.0
-123.0
0.0
0.0
}
["toString()"] {
"123"
"-123"
"0"
"0"
}
["toFixed()"] {
"123"
"-123"
"0"
"0"
"123.0"
"-123.00"
"0.000"
"0.0000"
"123456789.0"
"123456789.00"
"123456789.000"
"123456789.0000"
"Type constraint `this.isBetween(0, 20)` violated. Value: 21"
"Type constraint `this.isBetween(0, 20)` violated. Value: -1"
}
["shl()"] {
492
-492
0
}
["shr()"] {
30
-31
0
}
["ushr()"] {
30
4611686018427387873
0
}
["and()"] {
72
384
}
["or()"] {
507
-51
}
["xor()"] {
435
-435
}
["inv"] {
-124
122
}
["toChar()"] {
"a"
"😊"
"Decimal `-1` is not a valid Unicode code point."
"Decimal `1,114,112` is not a valid Unicode code point."
}
}
@@ -0,0 +1,74 @@
examples {
["construction"] {
IntSeq(-3, 2)
IntSeq(5, 5)
IntSeq(5, 0)
IntSeq(0, 0)
IntSeq(0, 10)
IntSeq(-10, 0)
}
["construction with step"] {
IntSeq(-3, 2).step(2)
IntSeq(2, -3).step(-2)
IntSeq(2, -3).step(-5)
IntSeq(2, -3).step(-7)
IntSeq(0, 1).step(-9223372036854775808)
IntSeq(9223372036854775807, -9223372036854775808).step(-9223372036854775808)
IntSeq(-9223372036854775808, 9223372036854775807).step(9223372036854775807)
"Type constraint `isNonZero` violated. Value: 0"
}
["start"] {
-3
2
}
["end"] {
2
-3
}
["step"] {
1
2
1
-2
}
["fold"] {
List(-3, -2, -1, 0, 1, 2)
List(5)
List()
List(0)
List(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
List(-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0)
List(-3, -1, 1)
List(2, 0, -2)
List(2, -3)
List(2)
}
["map"] {
List(-3, -2, -1, 0, 1, 2)
List(5)
List()
List(0)
List(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
List(-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0)
List(-3, -1, 1)
List(2, 0, -2)
List(2, -3)
List(2)
List()
List(9223372036854775807, -1)
List(-9223372036854775808, -1, 9223372036854775806)
}
["cannot instantiate"] {
"Cannot instantiate, or amend an instance of, external class `IntSeq`."
}
["toList"] {
true
true
true
}
["toListing"] {
true
true
true
}
}
@@ -0,0 +1,50 @@
res1 = null
res2 = true
res3 = false
res4 = 123
res5 = "Error parsing JSON document."
res6 = "Error parsing JSON document."
res7 = "Error parsing JSON document."
res8 = 123.456
res9 = 12345.6
res10 = "Error parsing JSON document."
res11 = "Error parsing JSON document."
res12 = "hello"
res13 = """
hello
world
"""
res14 {
"one"
"two"
"three"
}
res15 {
name = "Pigeon"
age = 42
}
res16 {
firstName = "John"
lastName = "Smith"
age = 25
address {
streetAddress = "21 2nd Street"
city = "New York"
state = "NY"
postalCode = "10021"
}
phoneNumber {
new {
type = "home"
number = "212 555-1234"
}
new {
type = "fax"
number = "646 555-4567"
}
}
gender {
type = "male"
}
}
res17 = "Error parsing JSON document."
@@ -0,0 +1,54 @@
res1 = null
res2 = false
res3 = true
res4 = 124
res8 = 124.686
res9 = 12346.83
res10 = "Error parsing JSON document."
res11 = "Error parsing JSON document."
res12 = "hellox"
res13 = """
hello
worldx
"""
res14 {
"onex"
"twox"
"threex"
"other"
}
res15 {
name = "Pigeonx"
age = 43
other = "other"
}
res16 {
firstName = "Johnx"
lastName = "Smithx"
age = 26
address {
streetAddress = "21 2nd Streetx"
city = "New Yorkx"
state = "NYx"
postalCode = "10021x"
other = "other"
}
phoneNumber {
new {
type = "homex"
number = "212 555-1234x"
other = "other"
}
new {
type = "faxx"
number = "646 555-4567x"
other = "other"
}
"other"
}
gender {
type = "malex"
other = "other"
}
other = "other"
}
@@ -0,0 +1,18 @@
res1 {
firstName = "changed"
lastName = "Smith"
age = 42
address {
streetAddress = "21 2nd Street"
city = "kroY weN"
state = "CA"
postalCode = "10021"
}
phoneNumber {
"mobile"
"mobile"
}
gender {
type = "female"
}
}
@@ -0,0 +1,35 @@
res1 {
"one"
"two"
"three"
}
res2 {
["name"] = "Pigeon"
["age"] = 42
}
res3 {
["firstName"] = "John"
["lastName"] = "Smith"
["age"] = 25
["address"] {
["streetAddress"] = "21 2nd Street"
["city"] = "New York"
["state"] = "NY"
["postalCode"] = "10021"
}
["phoneNumber"] {
new {
["type"] = "home"
["number"] = "212 555-1234"
}
new {
["type"] = "fax"
["number"] = "646 555-4567"
}
}
["gender"] {
["type"] = "male"
}
}
res4 = true
res5 = true
@@ -0,0 +1,20 @@
res1 {
["firstName"] = "changed"
["lastName"] = "Smith"
["age"] = 42
["address"] {
["streetAddress"] = "21 2nd Street"
["city"] = "kroY weN"
["state"] = "CA"
["postalCode"] = "10021"
}
["phoneNumber"] {
"mobile"
"mobile"
}
["gender"] {
["type"] = "female"
}
}
res2 = true
res3 = true
@@ -0,0 +1,4 @@
{
"name": "pigeon",
"age": 30
}
@@ -0,0 +1,4 @@
{
"name": "pigeon",
"age": 30
}
@@ -0,0 +1,54 @@
{
"res1": "gnirts",
"res2": false,
"res3": 43,
"res4": 2.33,
"res5": "3 s",
"res6": "4 mb",
"res8": [
43,
false,
"gnirts"
],
"res9": [
"gnirts",
false,
43,
5
],
"res10": {
"eno": false,
"owt": 2.33,
"eerht": "3 s"
},
"res11": [
"gnirts",
false,
43,
5
],
"res12": {
"eman": "noegip",
"ega": 31,
"eerht": "3 s"
},
"res13": {
"name": "noegip",
"age": 31,
"other": "rehto"
},
"res14": {
"name": "noegip",
"age": 41
},
"res15": "String",
"res16": [
2,
3
],
"res17": [
2,
5,
2
]
}
@@ -0,0 +1,54 @@
{
"res1": "gnirts",
"res2": false,
"res3": 43,
"res4": 2.33,
"res5": "3 s",
"res6": "4 mb",
"res8": [
43,
false,
"gnirts"
],
"res9": [
"gnirts",
false,
43,
5
],
"res10": {
"eno": false,
"owt": 2.33,
"eerht": "3 s"
},
"res11": [
"gnirts",
false,
43,
5
],
"res12": {
"eman": "noegip",
"ega": 31,
"eerht": "3 s"
},
"res13": {
"name": "noegip",
"age": 31,
"other": "rehto"
},
"res14": {
"name": "noegip",
"age": 41
},
"res15": "String",
"res16": [
2,
3
],
"res17": [
2,
5,
2
]
}
@@ -0,0 +1,12 @@
res1 = true
res2 = true
res3 = true
res4 = true
res5 = true
res6 = true
res7 = true
res8 = true
res9 = true
res10 = true
res11 = true
res12 = true
@@ -0,0 +1,18 @@
{
"res1": "converted",
"res2": "converted",
"res3": "converted",
"res4": "converted",
"res5": "converted",
"res6": "converted",
"res8": "converted",
"res9": "converted",
"res10": "converted",
"res11": "converted",
"res12": "converted",
"res13": "converted",
"res14": "converted",
"res15": "converted",
"res16": "converted",
"res17": "converted"
}
@@ -0,0 +1,18 @@
{
"res1": "converted",
"res2": "converted",
"res3": "converted",
"res4": "converted",
"res5": "converted",
"res6": "converted",
"res8": "converted",
"res9": "converted",
"res10": "converted",
"res11": "converted",
"res12": "converted",
"res13": "converted",
"res14": "converted",
"res15": "converted",
"res16": "converted",
"res17": "converted"
}
@@ -0,0 +1,55 @@
res1 = "123"
res2 = "1.23"
res3 = "false"
res4 = "\"pigeon\""
res6 = """
[
"pigeon",
"parrot"
]
"""
res7 = """
[
"pigeon",
"parrot"
]
"""
res8 = """
{
"name": "pigeon",
"age": 42
}
"""
res9 = """
[
"pigeon",
"parrot"
]
"""
res10 = """
{
"name": "pigeon",
"age": 42
}
"""
res11 = """
{
"name": "pigeon",
"age": 42
}
"""
res12 = """
{
"name": "pigeon",
"age": 42
}
"""
res13 = "null"
res14 = "Cannot render value of type `Duration` as JSON. Value: 1.min"
res15 = "Cannot render value of type `Pair` as JSON. Value: Pair(1, 2)"
res16 = "Cannot render value of type `DataSize` as JSON. Value: 1.mb"
res17 = "Cannot render value of type `Class` as JSON. Value: jsonRenderer4#Person"
res18 = "Cannot render value of type `TypeAlias` as JSON. Value: jsonRenderer4#Email"
res19 = "Cannot render value of type `Function1` as JSON. Value: new Function1 {}"
res20 = "ouch"
res21 = "Cannot render value of type `IntSeq` as JSON. Value: IntSeq(1, 4)"
@@ -0,0 +1,77 @@
res1 = """
123
"""
res2 = """
1.23
"""
res3 = """
false
"""
res4 = """
"pigeon"
"""
res6 = """
[
"pigeon",
"parrot"
]
"""
res7 = """
[
"pigeon",
"parrot"
]
"""
res8 = """
{
"name": "pigeon",
"age": 42
}
"""
res9 = """
[
"pigeon",
"parrot"
]
"""
res10 = """
{
"name": "pigeon",
"age": 42
}
"""
res11 = """
{
"name": "pigeon",
"age": 42
}
"""
res12 = """
{
"name": "pigeon",
"age": 42
}
"""
res13 = """
null
"""
res14 = "Cannot render value of type `Duration` as JSON. Value: 1.min"
res15 = "Cannot render value of type `Pair` as JSON. Value: Pair(1, 2)"
res16 = "Cannot render value of type `DataSize` as JSON. Value: 1.mb"
res17 = "Cannot render value of type `Class` as JSON. Value: jsonRenderer5#Person"
res18 = "Cannot render value of type `TypeAlias` as JSON. Value: jsonRenderer5#Email"
res19 = "Cannot render value of type `Function1` as JSON. Value: new Function1 {}"
res20 = "ouch"
res21 = "Cannot render value of type `IntSeq` as JSON. Value: IntSeq(1, 4)"
@@ -0,0 +1,16 @@
{
"name": "noegip",
"age": 42,
"friends": [
"barn owlx",
"parrotx"
],
"hobbies": {
"surfing": "low",
"firemaking": "high"
},
"address": {
"street": "Other St.",
"zip": "changed"
}
}
@@ -0,0 +1,16 @@
{
"name": "noegip",
"age": 42,
"friends": [
"barn owlx",
"parrotx"
],
"hobbies": {
"surfing": "low",
"firemaking": "high"
},
"address": {
"street": "Other St.",
"zip": "changed"
}
}
@@ -0,0 +1,7 @@
{
"res2": 1,
"res3": "Hello",
"res4": {
"foo": 1
}
}
@@ -0,0 +1,13 @@
–– Pkl Error ––
Cannot render value of type `Function1` as JSON.
Value: new Function1 {}
x | m = new Mixin {}
^^^^^^^^^^^^^^^^
at pkl.base#JsonRenderer.renderDocument (file:///$snippetsDir/input/api/jsonRenderer8.pkl)
Consider adding a converter to `output.converters`.
xxx | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (pkl:base)
@@ -0,0 +1,16 @@
{
"a1": [],
"a2": [],
"a3": [],
"b1": {},
"b2": {},
"b3": {},
"nested": {
"a1": [],
"a2": [],
"a3": [],
"b1": {},
"b2": {},
"b3": {}
}
}
@@ -0,0 +1,40 @@
{
int: 123,
float: 1.23,
bool: true,
string: 'Pigeon',
unicodeString: 'abc😀abc😎abc',
multiLineString: |||
have a
great
day
|||,
typedObject: {
name: 'Bob',
age: 42,
address: {
street: 'Abby Rd.',
},
},
dynamicObject: {
name: 'Pigeon',
age: 30,
address: {
street: 'Folsom St.',
},
},
annoyingNames: {
'5hello': 123,
'local': 'remote',
'foo.bar': 'baz',
"single'quote": 'double"quote',
},
list: [
1,
2,
3,
null,
],
someExternalVariable: std.extVar('MY_VARIABLE'),
someImportStr: importstr 'my/private/key.pem',
}
@@ -0,0 +1,40 @@
{
int: 123,
float: 1.23,
bool: true,
string: 'Pigeon',
unicodeString: 'abc😀abc😎abc',
multiLineString: |||
have a
great
day
|||,
typedObject: {
name: 'Bob',
age: 42,
address: {
street: 'Abby Rd.',
},
},
dynamicObject: {
name: 'Pigeon',
age: 30,
address: {
street: 'Folsom St.',
},
},
annoyingNames: {
'5hello': 123,
'local': 'remote',
'foo.bar': 'baz',
"single'quote": 'double"quote',
},
list: [
1,
2,
3,
null,
],
someExternalVariable: std.extVar('MY_VARIABLE'),
someImportStr: importstr 'my/private/key.pem',
}
@@ -0,0 +1 @@
{ hello: { world: [1, 'foo\nbar'] }, emptyArray: [], emptyObject: {} }
@@ -0,0 +1 @@
{ hello: { world: [1, 'foo\nbar'] }, emptyArray: [], emptyObject: {} }
@@ -0,0 +1,18 @@
{
res1: 'converted',
res2: 'converted',
res3: 'converted',
res4: 'converted',
res5: 'converted',
res6: 'converted',
res8: 'converted',
res9: 'converted',
res10: 'converted',
res11: 'converted',
res12: 'converted',
res13: 'converted',
res14: 'converted',
res15: 'converted',
res16: 'converted',
res17: 'converted',
}
@@ -0,0 +1,18 @@
{
res1: 'converted',
res2: 'converted',
res3: 'converted',
res4: 'converted',
res5: 'converted',
res6: 'converted',
res8: 'converted',
res9: 'converted',
res10: 'converted',
res11: 'converted',
res12: 'converted',
res13: 'converted',
res14: 'converted',
res15: 'converted',
res16: 'converted',
res17: 'converted',
}
@@ -0,0 +1,55 @@
res1 = "123"
res2 = "1.23"
res3 = "false"
res4 = "'pigeon'"
res6 = """
[
'pigeon',
'parrot',
]
"""
res7 = """
[
'pigeon',
'parrot',
]
"""
res8 = """
{
name: 'pigeon',
age: 42,
}
"""
res9 = """
[
'pigeon',
'parrot',
]
"""
res10 = """
{
name: 'pigeon',
age: 42,
}
"""
res11 = """
{
name: 'pigeon',
age: 42,
}
"""
res12 = """
{
name: 'pigeon',
age: 42,
}
"""
res13 = "null"
res14 = "Cannot render value of type `Pair` as Jsonnet. Value: Pair(1, 2)"
res15 = "Cannot render value of type `Duration` as Jsonnet. Value: 1.min"
res16 = "Cannot render value of type `DataSize` as Jsonnet. Value: 1.mb"
res17 = "Cannot render value of type `Class` as Jsonnet. Value: jsonnetRenderer4#Person"
res18 = "Cannot render value of type `TypeAlias` as Jsonnet. Value: jsonnetRenderer4#Email"
res19 = "Cannot render value of type `Function1` as Jsonnet. Value: new Function1 {}"
res20 = "ouch"
res21 = "Cannot render value of type `IntSeq` as Jsonnet. Value: IntSeq(1, 4)"
@@ -0,0 +1,77 @@
res1 = """
123
"""
res2 = """
1.23
"""
res3 = """
false
"""
res4 = """
'pigeon'
"""
res6 = """
[
'pigeon',
'parrot',
]
"""
res7 = """
[
'pigeon',
'parrot',
]
"""
res8 = """
{
name: 'pigeon',
age: 42,
}
"""
res9 = """
[
'pigeon',
'parrot',
]
"""
res10 = """
{
name: 'pigeon',
age: 42,
}
"""
res11 = """
{
name: 'pigeon',
age: 42,
}
"""
res12 = """
{
name: 'pigeon',
age: 42,
}
"""
res13 = """
null
"""
res14 = "Cannot render value of type `Pair` as Jsonnet. Value: Pair(1, 2)"
res15 = "Cannot render value of type `Duration` as Jsonnet. Value: 1.min"
res16 = "Cannot render value of type `DataSize` as Jsonnet. Value: 1.mb"
res17 = "Cannot render value of type `Class` as Jsonnet. Value: jsonnetRenderer5#Person"
res18 = "Cannot render value of type `TypeAlias` as Jsonnet. Value: jsonnetRenderer5#Email"
res19 = "Cannot render value of type `Function1` as Jsonnet. Value: new Function1 {}"
res20 = "ouch"
res21 = "Cannot render value of type `IntSeq` as Jsonnet. Value: IntSeq(1, 4)"
@@ -0,0 +1,16 @@
{
name: 'noegip',
age: 42,
friends: [
'barn owlx',
'parrotx',
],
hobbies: {
surfing: 'low',
firemaking: 'high',
},
address: {
street: 'Other St.',
zip: 'changed',
},
}
@@ -0,0 +1,16 @@
{
name: 'noegip',
age: 42,
friends: [
'barn owlx',
'parrotx',
],
hobbies: {
surfing: 'low',
firemaking: 'high',
},
address: {
street: 'Other St.',
zip: 'changed',
},
}
@@ -0,0 +1,13 @@
–– Pkl Error ––
Cannot render value of type `Function1` as Jsonnet.
Value: new Function1 {}
x | m = new Mixin {}
^^^^^^^^^^^^^^^^
at pkl.jsonnet#Renderer.renderDocument (file:///$snippetsDir/input/api/jsonnetRenderer7.pkl)
Consider adding a converter to `output.converters`.
xxx | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (pkl:base)
@@ -0,0 +1,425 @@
facts {
["isEmpty"] {
true
true
}
["every()"] {
true
true
}
["any()"] {
true
true
}
["contains()"] {
true
true
}
["startsWith()"] {
true
true
true
}
["endsWith()"] {
true
true
true
}
["isDistinct"] {
true
true
true
true
true
}
["isDistinctBy()"] {
true
true
true
true
true
}
}
examples {
["every"] {
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["any"] {
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["length"] {
3
}
["filter()"] {
List(2, 3)
List()
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["map()"] {
List(2, 4, 6)
List(List(1, 1), List(2, 2), List(3, 3))
}
["flatMap()"] {
List(1, 2, 2, 3, 3, 4)
"Expected value of type `Collection`, but got type `String`. Value: \"wrong type\""
}
["flatten()"] {
List(1, 2, 2, 3, 4, 5)
List(1, 2, 2, 3, 4, 5)
List(1, 2, 2, 3, 4, 5)
List(1, 2, 2, 3, 4, 5)
List()
}
["first"] {
1
}
["rest"] {
List(2, 3)
}
["last"] {
3
}
["single"] {
1
}
["count()"] {
2
3
0
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["find()"] {
2
1
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["findLast()"] {
3
3
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["indexOf()"] {
1
1
}
["lastIndexOf()"] {
1
3
}
["findIndex()"] {
1
1
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["findLastIndex()"] {
2
3
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["take()"] {
List()
List(1, 2)
List(1, 2, 3)
}
["takeWhile()"] {
List(1, 2, 3)
List()
List(1, 2)
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["takeLast()"] {
List()
List(2, 3)
List(1, 2, 3)
}
["takeLastWhile()"] {
List(1, 2, 3)
List()
List(2, 3)
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["drop()"] {
List(1, 2, 3)
List(3)
List()
}
["dropWhile()"] {
List()
List(1, 2, 3)
List(3)
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["dropLast()"] {
List(1, 2, 3)
List(1)
List()
}
["dropLastWhile()"] {
List()
List(1, 2, 3)
List(1)
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["fold()"] {
6
List(1, 2, 3)
1
0
}
["foldBack()"] {
6
List(3, 2, 1)
1
0
}
["reduce()"] {
6
1
"Expected a non-empty collection. Collection: List()"
}
["groupBy()"] {
Map(1, List(1), 2, List(2), 3, List(3), 4, List(4), 5, List(5))
Map(1, List(1, 1), 2, List(2, 2), 3, List(3))
Map(true, List(1, 3, 5), false, List(2, 4))
Map(true, List(1, 2, 3, 2, 1))
Map()
}
["repeat()"] {
List()
List(1, 2, 3)
List(1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3)
List()
List()
List()
"Expected a positive number, but got `-1`."
}
["sortWith()"] {
List()
List(1, 1, 1, 2, 3)
List(1, 2, 3, 4, 5)
}
["replaceRange()"] {
List(1, 9, 8, 5)
List(1, 9, 5)
List(1, 5)
List(1, 9, 8, 2, 3, 4, 5)
List(1, 9, 2, 3, 4, 5)
List(1, 2, 3, 4, 5)
"Element index `-1` is out of range `0`..`5`. Collection: List(1, 2, 3, 4, 5)"
"Element index `6` is out of range `3`..`5`. Collection: List(1, 2, 3, 4, 5)"
}
["toList()"] {
List(1, 2, 3)
List(1, 2, 3, 4, 5)
List(1, 2, 3, 2, 1)
}
["toSet()"] {
Set(1, 2, 3)
Set(1, 2, 3, 4, 5)
Set(1, 2, 3)
Set(new {
a = 1
}, new {
b = 2
})
}
["toMap()"] {
Map(1, 2, 2, 4, 3, 6)
Map("Pigeon", new {
name = "Pigeon"
age = 40
}, "Parrot", new {
name = "Parrot"
age = 30
})
}
["lastIndex"] {
2
-1
}
["add()"] {
List(42)
List(1, 2, 3, 42)
}
["replace()"] {
List(42, 2, 3)
List(1, 42, 3)
List(1, 2, 42)
"Element index `-1` is out of range `0`..`2`. Collection: List(1, 2, 3)"
"Element index `3` is out of range `0`..`2`. Collection: List(1, 2, 3)"
"Element index `0` is out of range `0`..`-1`. Collection: List()"
}
["minWith()"] {
1
1
"Expected a non-empty collection. Collection: List()"
}
["maxWith()"] {
3
1
"Expected a non-empty collection. Collection: List()"
}
["zip()"] {
List(Pair(1, 4), Pair(2, 5), Pair(3, 6))
List(Pair(1, 4), Pair(2, 5), Pair(3, 6))
}
["filterIndexed()"] {
List(2)
List(1, 3)
List()
List(3)
}
["mapIndexed()"] {
List(0, 2, 6)
List(false, true, false)
}
["flatMapIndexed()"] {
List(0, 2, 6)
List(false, true, false)
}
["foldIndexed()"] {
9
1
0
}
["toListing()"] {
new {
1
2
3
}
new {}
}
["toDynamic()"] {
new {
1
2
3
}
new {}
}
["filterNonNull()"] {
List(1, 2, 3)
List()
List(1, 2, 3)
List()
}
["mapNonNull()"] {
List(1, 2, 3)
List()
List()
List(1, 2, 3)
}
["filterIsInstance()"] {
List(1, 2, 3)
List(1, 2, 3)
List(1, 2, 3)
List()
List()
List("2", "4")
List()
}
["distinct"] {
List(1, 2, 3)
List(1, 2)
List("Pigeon", "Barn Owl", "Parrot")
List(1, "1")
List()
}
["distinctBy()"] {
List(1, 2, 3)
List(1, 2)
List("Pigeon", "Barn Owl", "Parrot")
List(1)
List()
}
["split()"] {
Pair(List(), List(1, 2, 3))
Pair(List(1), List(2, 3))
Pair(List(1, 2), List(3))
Pair(List(1, 2, 3), List())
Pair(List(), List())
"Element index `-1` is out of range `0`..`3`. Collection: List(1, 2, 3)"
"Element index `4` is out of range `0`..`3`. Collection: List(1, 2, 3)"
}
["partition()"] {
Pair(List(2), List(1, 3))
Pair(List(1, 3), List(2))
Pair(List(1, 2, 3), List())
Pair(List(), List(1, 2, 3))
Pair(List(), List())
}
["min"] {
1
"Barn Owl"
-99999
42
42
42.0
100.mb
100.ms
"Expected a non-empty collection. Collection: List()"
"Operator `<` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
["max"] {
3
"Pigeon"
42
42
42
42.0
12.tb
3.d
"Expected a non-empty collection. Collection: List()"
"Operator `>` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
["minBy()"] {
1
3
"Pigeon"
"Barn Owl"
11.gb
100.mb
11.s
100.ms
"Expected a non-empty collection. Collection: List()"
"Operator `<` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
["maxBy()"] {
3
1
"Barn Owl"
"Parrot"
100.mb
12.tb
100.ms
12.min
"Expected a non-empty collection. Collection: List()"
"Operator `>` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
["sort()"] {
List(1, 2, 3)
List(-99999, -8.4, 3.9, 42)
List("Barn Owl", "Parrot", "Pigeon")
List(100.mb, 11.gb, 12.tb)
List(100.ms, 11.s, 3.d)
List()
"Operator `<` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
["sortBy()"] {
List(1, 2, 3)
List(3, 2, 1)
List("Pigeon", "Parrot", "Barn Owl")
List("Barn Owl", "Pigeon", "Parrot")
List(11.gb, 12.tb, 100.mb)
List(100.mb, 11.gb, 12.tb)
List()
List(0, -1, 2, -3, 4, -5, 6, -7, 8, -9, 10)
}
["reverse()"] {
List(3, 2, 1)
List(1, 2, 3)
List(3.d, "Pigeon", 1)
List()
}
}
@@ -0,0 +1,144 @@
examples {
["getOrNull()"] {
2
null
null
}
["sublistOrNull()"] {
List(2, 3)
null
}
["firstOrNull"] {
1
null
}
["restOrNull"] {
List(2, 3)
null
}
["lastOrNull"] {
3
null
}
["singleOrNull"] {
1
null
null
}
["findOrNull()"] {
2
null
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["findLastOrNull()"] {
3
null
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["indexOfOrNull()"] {
1
null
}
["lastIndexOfOrNull()"] {
1
null
}
["findIndexOrNull()"] {
1
null
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["findLastIndexOrNull()"] {
2
null
"Expected value of type `Boolean`, but got type `String`. Value: \"wrong type\""
}
["reduceOrNull()"] {
6
1
null
}
["replaceRangeOrNull()"] {
List(1, 9, 8, 5)
List(1, 9, 5)
List(1, 5)
List(1, 9, 8, 2, 3, 4, 5)
List(1, 9, 2, 3, 4, 5)
List(1, 2, 3, 4, 5)
null
null
}
["replaceOrNull()"] {
List(42, 2, 3)
List(1, 42, 3)
List(1, 2, 42)
null
null
null
}
["minWithOrNull()"] {
1
1
null
3
1
null
}
["splitOrNull()"] {
Pair(List(), List(1, 2, 3))
Pair(List(1), List(2, 3))
Pair(List(1, 2), List(3))
Pair(List(1, 2, 3), List())
Pair(List(), List())
null
null
}
["minOrNull"] {
1
"Barn Owl"
-99999
42
42
42.0
100.mb
100.ms
null
"Operator `<` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
["maxOrNull"] {
3
"Pigeon"
42
42
42
42.0
12.tb
3.d
null
"Operator `>` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
["minByOrNull()"] {
1
3
"Pigeon"
"Barn Owl"
11.gb
100.mb
11.s
100.ms
null
"Operator `<` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
["maxByOrNull()"] {
3
1
"Barn Owl"
"Parrot"
100.mb
12.tb
100.ms
12.min
null
"Operator `>` is not defined for operand types `String` and `Int`. Left operand : \"Pigeon\" Right operand: 1"
}
}
@@ -0,0 +1,327 @@
facts {
["isEmpty"] {
true
true
true
true
}
["isDistinct"] {
true
true
true
true
true
}
["isDistinctBy()"] {
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
}
}
examples {
["length"] {
0
0
3
5
}
["toList()"] {
List()
List()
List(new {
name = "Pigeon"
}, new {
name = "Barn Owl"
}, new {
name = "Parrot"
})
List(new {
name = "Pigeon"
}, new {
name = "Barn Owl"
}, new {
name = "Parrot"
}, new {
name = "Albatross"
}, new {
name = "Elf Owl"
})
List(new {
name = "Pigeon"
}, new {
name = "Barn Owl"
}, new {
name = "Parrot"
}, new {
name = "Albatross"
}, new {
name = "Parrot"
}, new {
name = "Elf Owl"
})
}
["toSet()"] {
Set()
Set()
Set(new {
name = "Pigeon"
}, new {
name = "Barn Owl"
}, new {
name = "Parrot"
})
Set(new {
name = "Pigeon"
}, new {
name = "Barn Owl"
}, new {
name = "Parrot"
}, new {
name = "Albatross"
}, new {
name = "Elf Owl"
})
Set(new {
name = "Pigeon"
}, new {
name = "Barn Owl"
}, new {
name = "Parrot"
}, new {
name = "Albatross"
}, new {
name = "Elf Owl"
})
}
["distinct"] {
new {}
new {}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
new {
name = "Albatross"
}
new {
name = "Elf Owl"
}
}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
new {
name = "Albatross"
}
new {
name = "Elf Owl"
}
}
}
["distinctBy()"] {
new {}
new {}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
new {
name = "Albatross"
}
new {
name = "Elf Owl"
}
}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
new {
name = "Albatross"
}
new {
name = "Elf Owl"
}
}
new {}
new {}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
new {
name = "Albatross"
}
new {
name = "Elf Owl"
}
}
new {
new {
name = "Pigeon"
}
new {
name = "Barn Owl"
}
new {
name = "Parrot"
}
new {
name = "Albatross"
}
new {
name = "Elf Owl"
}
}
new {}
new {}
new {
new {
name = "Pigeon"
}
}
new {
new {
name = "Pigeon"
}
}
new {
new {
name = "Pigeon"
}
}
}
["fold"] {
List()
List(new {
name = "Pigeon"
}, new {
name = "Barn Owl"
}, new {
name = "Parrot"
})
List(new {
name = "Pigeon"
}, new {
name = "Barn Owl"
}, new {
name = "Parrot"
}, new {
name = "Albatross"
}, new {
name = "Elf Owl"
})
}
["foldIndexed"] {
List()
List(Pair(0, new {
name = "Pigeon"
}), Pair(1, new {
name = "Barn Owl"
}), Pair(2, new {
name = "Parrot"
}))
List(Pair(0, new {
name = "Pigeon"
}), Pair(1, new {
name = "Barn Owl"
}), Pair(2, new {
name = "Parrot"
}), Pair(3, new {
name = "Albatross"
}), Pair(4, new {
name = "Elf Owl"
}))
}
["join"] {
""
"123"
"1, 2, 3"
"PigeonBarn OwlParrot"
"Pigeon---Barn Owl---Parrot"
"PigeonBarn OwlParrotAlbatrossElf Owl"
"""
Pigeon
Barn Owl
Parrot
Albatross
Elf Owl
"""
}
}
@@ -0,0 +1,129 @@
facts {
["isEmpty"] {
true
true
}
["containsKey()"] {
true
true
true
}
["containsValue()"] {
true
true
true
}
["every()"] {
true
true
true
}
["any()"] {
true
true
true
}
}
examples {
["length"] {
0
3
}
["getOrNull()"] {
1
null
}
["keys"] {
Set()
Set("one", "two", "three")
Set("one", "two", "three", "four")
}
["values"] {
List()
List(1, 2, 3)
List(1, 2, 3, 4)
}
["remove()"] {
Map()
Map("one", 1, "three", 3)
Map("one", 1, "two", 2, "three", 3)
}
["filter()"] {
Map()
Map("one", 1, "two", 2)
Map("two", 2)
}
["mapKeys()"] {
Map()
Map("ONE1", 1, "TWO2", 2, "THREE3", 3)
Map("one", 1, "two", 2, "three", 3)
}
["mapValues()"] {
Map()
Map("one", 6, "two", 9, "three", 14)
Map("one", 1, "two", 2, "three", 3)
}
["map()"] {
Map()
Map("one", 3, "two", 6, "three", 9)
Map(1, "one", 2, "two", 3, "three")
"Expected value of type `Pair`, but got type `Int`. Value: 42"
}
["flatMap()"] {
Map()
Map(1, 3, 2, 6, 3, 9)
Map("one", "eno", "two", "owt", "three", "eerht")
"Expected value of type `Map`, but got type `Int`. Value: 42"
}
["entries"] {
List()
List(Pair("one", 1), Pair("two", 2), Pair("three", 3))
List(Pair("one", 1), Pair("two", 2), Pair("three", 3), Pair("four", 4))
}
["toMap()"] {
Map()
Map("one", 1, "two", 2, "three", 3)
}
["toDynamic()"] {
new {}
new {
one = 1
two = 2
three = 3
}
}
["toMapping()"] {
new {}
new {
["one"] = 1
["two"] = 2
["three"] = 3
}
}
["put()"] {
Map("one", 1)
Map("one", 1, "two", 2, "three", 3)
Map("one", 1, "two", 2, "three", 3, "four", 4)
Map("one", 4, "two", 2, "three", 3)
}
["toTyped()"] {
new {
name = "Pigeon"
age = 42
}
new {
name = "Pigeon"
age = 42
}
"Default"
true
true
new {
name = "Pigeon"
age = 42
}
"Tried to read property `age` but its value is undefined."
"Class `Int` is not a subtype of `Typed`."
"Cannot instantiate abstract class `map#Abstract`."
}
}
@@ -0,0 +1,106 @@
facts {
["isEmpty"] {
true
true
true
true
}
["containsKey()"] {
true
true
true
true
true
true
true
true
true
true
true
}
["length"] {
true
true
true
}
["keys (of type string)"] {
true
true
true
}
["keys (of type object)"] {
true
true
}
}
examples {
["getOrNull()"] {
new {
name = "Pigeon"
age = 42
}
new {
name = "Parrot"
age = 24
}
null
null
new {
name = "Piggy"
age = 42
}
new {
name = "Parrot"
age = 24
}
new {
name = "Barn Owl"
age = 84
}
null
null
null
}
["fold()"] {
List(Pair("Pigeon", new {
name = "Pigeon"
age = 42
}), Pair("Parrot", new {
name = "Parrot"
age = 24
}))
List(Pair("Pigeon", new {
name = "Piggy"
age = 42
}), Pair("Parrot", new {
name = "Parrot"
age = 24
}), Pair("Barn Owl", new {
name = "Barn Owl"
age = 84
}))
List()
List()
}
["toMap()"] {
Map("Pigeon", new {
name = "Pigeon"
age = 42
}, "Parrot", new {
name = "Parrot"
age = 24
})
Map("Pigeon", new {
name = "Piggy"
age = 42
}, "Parrot", new {
name = "Parrot"
age = 24
}, "Barn Owl", new {
name = "Barn Owl"
age = 84
})
Map()
Map()
}
}
@@ -0,0 +1,166 @@
examples {
["minInt"] {
-9223372036854775808
-128
-32768
-2147483648
}
["maxInt"] {
9223372036854775807
127
32767
2147483647
}
["maxUInt"] {
9223372036854775807
255
65535
4294967295
}
["e"] {
2.718281828459045
}
["pi"] {
3.141592653589793
}
["exp"] {
7.38905609893065
10.381236562731843
0.1353352832366127
0.09632763823049303
}
["sqrt"] {
3.0
1.4142135623730951
1.5297058540778354
NaN
NaN
}
["cbrt"] {
3.0
1.2599210498948732
1.3276143942617729
-1.2599210498948732
-1.3276143942617729
}
["log"] {
0.6931471805599453
0.85015092936961
NaN
NaN
}
["log2"] {
1.0
1.2265085298086797
NaN
NaN
}
["log10"] {
0.3010299956639812
0.36921585741014284
NaN
NaN
}
["sin"] {
0.0
1.2246467991473532E-16
0.9092974268256817
0.7184647930691261
-0.9092974268256817
-0.7184647930691261
}
["cos"] {
1.0
-1.0
-0.4161468365471424
-0.695563326462902
-0.4161468365471424
-0.695563326462902
}
["tan"] {
0.0
-1.2246467991473532E-16
-2.185039863261519
-1.032925063376592
2.185039863261519
1.032925063376592
}
["asin"] {
0.0
1.2246467991473532E-16
1.1415926535897933
0.8015926535897933
-1.1415926535897933
-0.8015926535897933
}
["acos"] {
0.0
3.141592653589793
2.0
2.34
2.0
2.34
}
["atan"] {
0.0
-1.2246467991473532E-16
-1.1415926535897931
-0.8015926535897934
1.1415926535897931
0.8015926535897934
}
["gcd"] {
0
2
"Expected a positive number, but got `-4`."
"Expected a positive number, but got `-6`."
99
"Expected value of type `Int`, but got type `Float`. Value: 6.1"
}
["lcm"] {
0
12
"Expected a positive number, but got `-4`."
"Expected a positive number, but got `-6`."
"Integer overflow."
"Expected value of type `Int`, but got type `Float`. Value: 6.1"
}
["isPowerOfTwo"] {
false
false
true
true
true
true
true
true
false
false
false
false
}
["max"] {
0
0.0
0.0
4
4
123.456
123.456
NaN
NaN
Infinity
}
["min"] {
0
0.0
-0.0
2
-2
123.0
123.455
NaN
NaN
-Infinity
}
}
@@ -0,0 +1,9 @@
examples {
["relativePathTo()"] {
List("dir1", "dir2")
List()
List()
List()
"No descendent path exists between modules `file:///$snippetsDir/input/api/dir1/dir2/relativePathTo.pkl` and `file:///$snippetsDir/input/api/module.pkl`."
}
}
@@ -0,0 +1 @@
some string
@@ -0,0 +1,3 @@
{
"res1": 42
}
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>30</integer>
</dict>
</plist>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>30</integer>
</dict>
</plist>
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>res1</key>
<string>gnirts</string>
<key>res2</key>
<false/>
<key>res3</key>
<integer>43</integer>
<key>res4</key>
<real>2.33</real>
<key>res5</key>
<string>3 s</string>
<key>res6</key>
<string>4 mb</string>
<key>res8</key>
<array>
<integer>43</integer>
<false/>
<string>gnirts</string>
</array>
<key>res9</key>
<array>
<string>gnirts</string>
<false/>
<integer>43</integer>
<integer>5</integer>
</array>
<key>res10</key>
<dict>
<key>eno</key>
<false/>
<key>owt</key>
<real>2.33</real>
<key>eerht</key>
<string>3 s</string>
</dict>
<key>res11</key>
<array>
<string>gnirts</string>
<false/>
<integer>43</integer>
<integer>5</integer>
</array>
<key>res12</key>
<dict>
<key>eman</key>
<string>noegip</string>
<key>ega</key>
<integer>31</integer>
<key>eerht</key>
<string>3 s</string>
</dict>
<key>res13</key>
<dict>
<key>name</key>
<string>noegip</string>
<key>age</key>
<integer>31</integer>
<key>other</key>
<string>rehto</string>
</dict>
<key>res14</key>
<dict>
<key>name</key>
<string>noegip</string>
<key>age</key>
<integer>41</integer>
</dict>
<key>res15</key>
<string>String</string>
<key>res16</key>
<array>
<integer>2</integer>
<integer>5</integer>
<integer>2</integer>
</array>
</dict>
</plist>
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>res1</key>
<string>gnirts</string>
<key>res2</key>
<false/>
<key>res3</key>
<integer>43</integer>
<key>res4</key>
<real>2.33</real>
<key>res5</key>
<string>3 s</string>
<key>res6</key>
<string>4 mb</string>
<key>res8</key>
<array>
<integer>43</integer>
<false/>
<string>gnirts</string>
</array>
<key>res9</key>
<array>
<string>gnirts</string>
<false/>
<integer>43</integer>
<integer>5</integer>
</array>
<key>res10</key>
<dict>
<key>eno</key>
<false/>
<key>owt</key>
<real>2.33</real>
<key>eerht</key>
<string>3 s</string>
</dict>
<key>res11</key>
<array>
<string>gnirts</string>
<false/>
<integer>43</integer>
<integer>5</integer>
</array>
<key>res12</key>
<dict>
<key>eman</key>
<string>noegip</string>
<key>ega</key>
<integer>31</integer>
<key>eerht</key>
<string>3 s</string>
</dict>
<key>res13</key>
<dict>
<key>name</key>
<string>noegip</string>
<key>age</key>
<integer>31</integer>
<key>other</key>
<string>rehto</string>
</dict>
<key>res14</key>
<dict>
<key>name</key>
<string>noegip</string>
<key>age</key>
<integer>41</integer>
</dict>
<key>res15</key>
<string>String</string>
<key>res16</key>
<array>
<integer>2</integer>
<integer>5</integer>
<integer>2</integer>
</array>
</dict>
</plist>
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>res1</key>
<string>converted</string>
<key>res2</key>
<string>converted</string>
<key>res3</key>
<string>converted</string>
<key>res4</key>
<string>converted</string>
<key>res5</key>
<string>converted</string>
<key>res6</key>
<string>converted</string>
<key>res7</key>
<string>converted</string>
<key>res8</key>
<string>converted</string>
<key>res9</key>
<string>converted</string>
<key>res10</key>
<string>converted</string>
<key>res11</key>
<string>converted</string>
<key>res12</key>
<string>converted</string>
<key>res13</key>
<string>converted</string>
<key>res14</key>
<string>converted</string>
<key>res15</key>
<string>converted</string>
<key>res16</key>
<string>converted</string>
</dict>
</plist>
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>res1</key>
<string>converted</string>
<key>res2</key>
<string>converted</string>
<key>res3</key>
<string>converted</string>
<key>res4</key>
<string>converted</string>
<key>res5</key>
<string>converted</string>
<key>res6</key>
<string>converted</string>
<key>res7</key>
<string>converted</string>
<key>res8</key>
<string>converted</string>
<key>res9</key>
<string>converted</string>
<key>res10</key>
<string>converted</string>
<key>res11</key>
<string>converted</string>
<key>res12</key>
<string>converted</string>
<key>res13</key>
<string>converted</string>
<key>res14</key>
<string>converted</string>
<key>res15</key>
<string>converted</string>
<key>res16</key>
<string>converted</string>
</dict>
</plist>
@@ -0,0 +1,62 @@
res1 = "<integer>123</integer>"
res2 = "<real>1.23</real>"
res3 = "<false/>"
res4 = "<string>pigeon</string>"
res6 = """
<array>
<string>pigeon</string>
<string>parrot</string>
</array>
"""
res7 = """
<array>
<string>pigeon</string>
<string>parrot</string>
</array>
"""
res8 = """
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>42</integer>
</dict>
"""
res9 = """
<array>
<string>pigeon</string>
<string>parrot</string>
</array>
"""
res10 = """
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>42</integer>
</dict>
"""
res11 = """
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>42</integer>
</dict>
"""
res12 = """
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>42</integer>
</dict>
"""
res13 = "Cannot render value of type `Null` as XML property list. Value: null"
res14 = "Cannot render value of type `Duration` as XML property list. Value: 1.min"
res15 = "Cannot render value of type `DataSize` as XML property list. Value: 1.mb"
res16 = "Cannot render value of type `Class` as XML property list. Value: pListRenderer4#Person"
res17 = "Cannot render value of type `TypeAlias` as XML property list. Value: pListRenderer4#Email"
res18 = "Cannot render value of type `Function1` as XML property list. Value: new Function1 {}"
res19 = "ouch"
res20 = "Cannot render value of type `IntSeq` as XML property list. Value: IntSeq(1, 4)"
@@ -0,0 +1,98 @@
res1 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `Int`. Value: 123"
res2 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `Float`. Value: 1.23"
res3 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `Boolean`. Value: false"
res4 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `String`. Value: \"pigeon\""
res6 = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>pigeon</string>
<string>parrot</string>
</array>
</plist>
"""
res7 = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>pigeon</string>
<string>parrot</string>
</array>
</plist>
"""
res8 = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>42</integer>
</dict>
</plist>
"""
res9 = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<string>pigeon</string>
<string>parrot</string>
</array>
</plist>
"""
res10 = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>42</integer>
</dict>
</plist>
"""
res11 = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>42</integer>
</dict>
</plist>
"""
res12 = """
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>pigeon</string>
<key>age</key>
<integer>42</integer>
</dict>
</plist>
"""
res13 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `Duration`. Value: 1.min"
res14 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `DataSize`. Value: 1.mb"
res15 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `Class`. Value: pListRenderer5#Person"
res16 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `TypeAlias`. Value: pListRenderer5#Email"
res17 = "Cannot render value of type `Function1` as XML property list. Value: new Function1 {}"
res18 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `Null`. Value: null"
res19 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `Pair`. Value: Pair(1, 2)"
res20 = "ouch"
res21 = "The top-level value of an XML property list must have type `Typed`, `Dynamic`, `Listing`, `Mapping`, `List`, `Set`, or `Map`, but got type `IntSeq`. Value: IntSeq(1, 4)"
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>noegip</string>
<key>age</key>
<integer>42</integer>
<key>friends</key>
<array>
<string>barn owlx</string>
<string>parrotx</string>
</array>
<key>hobbies</key>
<dict>
<key>surfing</key>
<string>low</string>
<key>firemaking</key>
<string>high</string>
</dict>
<key>address</key>
<dict>
<key>street</key>
<string>Other St.</string>
<key>zip</key>
<string>changed</string>
</dict>
</dict>
</plist>
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>noegip</string>
<key>age</key>
<integer>42</integer>
<key>friends</key>
<array>
<string>barn owlx</string>
<string>parrotx</string>
</array>
<key>hobbies</key>
<dict>
<key>surfing</key>
<string>low</string>
<key>firemaking</key>
<string>high</string>
</dict>
<key>address</key>
<dict>
<key>street</key>
<string>Other St.</string>
<key>zip</key>
<string>changed</string>
</dict>
</dict>
</plist>
@@ -0,0 +1,13 @@
–– Pkl Error ––
Cannot render value of type `Function1` as XML property list.
Value: new Function1 {}
x | m = new Mixin {}
^^^^^^^^^^^^^^^^
at pkl.base#PListRenderer.renderDocument (file:///$snippetsDir/input/api/pListRenderer7.pkl)
Consider adding a converter to `output.converters`.
xxx | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (pkl:base)
@@ -0,0 +1,26 @@
examples {
["first"] {
"Pigeon"
new {
name = "Pigeon"
}
null
}
["second"] {
42
List(1, 2, 3)
Pair(Regex("Pigeon"), 42.ms)
}
["key"] {
"Pigeon"
new {
name = "Pigeon"
}
null
}
["value"] {
42
List(1, 2, 3)
Pair(Regex("Pigeon"), 42.ms)
}
}
@@ -0,0 +1,29 @@
pigeon {
name = "pigeon"
age = 30
}
barnOwl {
name = "barn owl"
age = 42
"surfing"
"fire making"
}
parrot {
new {
lastName = """
Flinstone
Flinstone
"""
"""
Flinstone
Flinstone
"""
}
"""
Flistone
Flistone
"""
}
@@ -0,0 +1,32 @@
res1 = "gnirts"
res2 = false
res3 = 43
res4 = 2.33
res5 = 5.s
res6 = 6.mb
res8 = List(43, false, "gnirts")
res9 = Set("gnirts", false, 43, 5)
res10 = Map("eno", false, "owt", 2.33, "eerht", 5.s)
res11 {
"gnirts"
false
43
5
}
res12 {
["eman"] = "noegip"
["ega"] = 31
["eerht"] = 5.s
}
res13 {
name = "noegip"
age = 31
other = "rehto"
}
res14 {
name = "noegip"
age = 41
}
res15 = "String"
res16 = Pair(2, 1)
res17 = List(2, 5, 2)
@@ -0,0 +1,12 @@
res1 = true
res2 = true
res3 = true
res4 = true
res5 = true
res6 = true
res7 = true
res8 = true
res9 = true
res10 = true
res11 = true
res12 = true
@@ -0,0 +1,16 @@
res1 = "converted"
res2 = "converted"
res3 = "converted"
res4 = "converted"
res5 = "converted"
res6 = "converted"
res8 = "converted"
res9 = "converted"
res10 = "converted"
res11 = "converted"
res12 = "converted"
res13 = "converted"
res14 = "converted"
res15 = "converted"
res16 = "converted"
res17 = "converted"
@@ -0,0 +1,42 @@
res1 = "123"
res2 = "1.23"
res3 = "false"
res4 = "\"pigeon\""
res5 = "List(\"pigeon\", \"parrot\")"
res6 = "Set(\"pigeon\", \"parrot\")"
res7 = "Map(\"name\", \"pigeon\", \"age\", 42)"
res8 = """
{
"pigeon"
"parrot"
}
"""
res9 = """
{
["name"] = "pigeon"
["age"] = 42
}
"""
res10 = """
{
name = "pigeon"
age = 42
}
"""
res11 = """
{
name = "pigeon"
age = 42
}
"""
res12 = "1.min"
res13 = "1.mb"
res14 = "null"
res15 = "Pair(1, 2)"
res16 = "IntSeq(1, 4)"
res17 = "IntSeq(1, 4).step(-2)"
res18 = "Regex(\"a.*b\")"
res19 = "Cannot render value of type `Class` as Pcf. Value: pcfRenderer4#Person"
res20 = "Cannot render value of type `TypeAlias` as Pcf. Value: pcfRenderer4#Email"
res21 = "Cannot render value of type `Function1` as Pcf. Value: new Function1 {}"
res22 = "ouch"
@@ -0,0 +1,28 @@
res1 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Int`. Value: 123"
res2 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Float`. Value: 1.23"
res3 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Boolean`. Value: false"
res4 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `String`. Value: \"pigeon\""
res5 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `List`. Value: List(\"pigeon\", \"parrot\")"
res6 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Set`. Value: Set(\"pigeon\", \"parrot\")"
res7 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Map`. Value: Map(\"name\", \"pigeon\", \"age\", 42)"
res8 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Listing`. Value: new Listing { ?; ? }"
res9 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Mapping`. Value: new Mapping { [\"name\"] = ?; [\"age\"] = ? }"
res10 = """
name = "pigeon"
age = 42
"""
res11 = """
name = "pigeon"
age = 42
"""
res12 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Duration`. Value: 1.min"
res13 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `DataSize`. Value: 1.mb"
res14 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Null`. Value: null"
res15 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Pair`. Value: Pair(1, 2)"
res16 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Class`. Value: pcfRenderer5#Person"
res17 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `TypeAlias`. Value: pcfRenderer5#Email"
res18 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `Function1`. Value: new Function1 {}"
res19 = "ouch"
res20 = "The top-level value of a Pcf document must have type `Typed` or `Dynamic`, but got type `IntSeq`. Value: IntSeq(1, 4)"
@@ -0,0 +1,17 @@
baz {
qux = 42
corge {
null
1337
null
"Hello World"
}
grault {
["garply"] = null
["waldo"] = 42
[new {
"pigeon"
}] = null
}
thud = Pair(new {}, new {})
}
@@ -0,0 +1,82 @@
rawString {
res1 = #"\r\n\t\\"#
res2 = "$foo"
res3 = #"\(3 * 4)"#
res4 = #"\r\n\t\\"#
res5 = "$foo"
res6 = #"\(3 * 4)"#
res7 = #"""
\r\n\t\\
$foo
\(3 * 4)
"""#
res9 = "leading and trailing newline trimmed"
res10 = """
leading newline not trimmed
"""
res11 = """
leading newlines not trimmed
"""
res13 = """
trailing newline not trimmed
"""
res14 = """
trailing newlines not trimmed
"""
res16 = """
leading
whitespace
trimmed
"""
res17 = """
leading
whitespace
partially
trimmed
"""
res18 = """
leading
whitespace
partially
trimmed
"""
res19 = #""AS IS""#
res20 = #""\#"AS IS"""#
res21 = #""\#""""AS IS""""""#
res22 = #""AS IS""#
res23 = #""\#"AS IS"""#
res24 = #""\#""""AS IS""""""#
res25 = ##"# ## ### " "" """ \ \#"##
res26 = ###"# ## ### #### " "" """ """" \ \# \##"###
res27 = #####"# ## ### #### ##### ###### " "" """ """" """"" \ \# \## \### \####"#####
res28 = "onetwothreetwoonetwo"
res29 = "\t \t\t \t\t\t \t\t \t \t\t"
res30 = "a 🤠 ǝ"
res31 = "a 🤠 ǝ"
res32 = ##"# ## ### " "" """ \ \#"##
res33 = ###"# ## ### #### " "" """ """" \ \# \##"###
res34 = #####"# ## ### #### ##### ###### " "" """ """" """"" \ \# \## \### \####"#####
res35 = "onetwothreetwoonetwo"
res36 = "\t \t\t \t\t\t \t\t \t \t\t"
res37 = "a 🤠 ǝ"
res38 = "a 🤠 ǝ"
}
res39 = ######"""
"""#####
delimiters for multiline string
"""######
res40 = """
"#####
no delimiters for multiline string
"""
res41 = ##"\#"##
@@ -0,0 +1,13 @@
–– Pkl Error ––
Cannot render value of type `Function1` as Pcf.
Value: new Function1 {}
x | m = new Mixin {}
^^^^^^^^^^^^^^^^
at pkl.base#PcfRenderer.renderDocument (file:///$snippetsDir/input/api/pcfRenderer8.pkl)
Consider adding a converter to `output.converters`.
xxx | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (pkl:base)
@@ -0,0 +1,20 @@
facts {
["language"] {
true
}
["runtime"] {
true
true
}
["virtualMachine"] {
true
true
}
["operatingSystem"] {
true
true
}
["processor"] {
true
}
}
@@ -0,0 +1,12 @@
res1 = true
res2 = true
res3 = true
res4 = true
res5 = true
res6 = true
res7 = true
res8 = true
res9 = true
res10 = true
res11 = true
res12 = true
@@ -0,0 +1,2 @@
name = pigeon
age = 30
@@ -0,0 +1,2 @@
name = pigeon
age = 30
@@ -0,0 +1,13 @@
–– Pkl Error ––
Cannot render value of type `List` as Properties.
Value: List("bar")
x | foo = new PropertiesRenderer {}.renderValue(List("bar"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at propertiesRenderer10.properties#foo (file:///$snippetsDir/input/api/propertiesRenderer10.properties.pkl)
Consider adding a converter to `output.converters`.
xxx | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (pkl:base)
@@ -0,0 +1,13 @@
–– Pkl Error ––
Cannot render value of type `List` as Properties.
Value: List("bar")
x | foo = new PropertiesRenderer {}.renderValue(List("bar"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at propertiesRenderer10.properties#foo (file:///$snippetsDir/input/api/propertiesRenderer10.properties.pkl)
Consider adding a converter to `output.converters`.
xx | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (pkl:base)
@@ -0,0 +1,13 @@
–– Pkl Error ––
Cannot render value of type `Function1` as Properties.
Value: new Function1 {}
x | m = new Mixin {}
^^^^^^^^^^^^^^^^
at pkl.base#PropertiesRenderer.renderDocument (file:///$snippetsDir/input/api/propertiesRenderer11.pkl)
Consider adding a converter to `output.converters`.
xxx | text = renderer.renderDocument(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.base#Module.output.text (pkl:base)
@@ -0,0 +1,15 @@
res1 = gnirts
res2 = false
res3 = 43
res4 = 2.33
res5 = 3 s
res6 = 4 mb
res8 = [\n 43,\n false,\n "gnirts"\n]
res9 = [\n "gnirts",\n false,\n 43,\n 5\n]
res10 = {\n "eno"\: false,\n "owt"\: 2.33,\n "eerht"\: "3 s"\n}
res11 = [\n "gnirts",\n false,\n 43,\n 5\n]
res12 = {\n "eman"\: "noegip",\n "ega"\: 31,\n "eerht"\: "3 s"\n}
res13 = {\n "name"\: "noegip",\n "age"\: 31,\n "other"\: "rehto"\n}
res14 = {\n "name"\: "noegip",\n "age"\: 41\n}
res15 = String
res16 = [\n 3,\n 2\n]
@@ -0,0 +1,15 @@
res1 = gnirts
res2 = false
res3 = 43
res4 = 2.33
res5 = 3 s
res6 = 4 mb
res8 = [\n 43,\n false,\n "gnirts"\n]
res9 = [\n "gnirts",\n false,\n 43,\n 5\n]
res10 = {\n "eno"\: false,\n "owt"\: 2.33,\n "eerht"\: "3 s"\n}
res11 = [\n "gnirts",\n false,\n 43,\n 5\n]
res12 = {\n "eman"\: "noegip",\n "ega"\: 31,\n "eerht"\: "3 s"\n}
res13 = {\n "name"\: "noegip",\n "age"\: 31,\n "other"\: "rehto"\n}
res14 = {\n "name"\: "noegip",\n "age"\: 41\n}
res15 = String
res16 = [\n 3,\n 2\n]
@@ -0,0 +1,12 @@
res1 = true
res2 = true
res3 = true
res4 = true
res5 = true
res6 = true
res7 = true
res8 = true
res9 = true
res10 = true
res11 = true
res12 = true
@@ -0,0 +1,16 @@
res1 = converted
res2 = converted
res3 = converted
res4 = converted
res5 = converted
res6 = converted
res8 = converted
res9 = converted
res10 = converted
res11 = converted
res12 = converted
res13 = converted
res14 = converted
res15 = converted
res16 = converted
res18 = converted
@@ -0,0 +1,16 @@
res1 = converted
res2 = converted
res3 = converted
res4 = converted
res5 = converted
res6 = converted
res8 = converted
res9 = converted
res10 = converted
res11 = converted
res12 = converted
res13 = converted
res14 = converted
res15 = converted
res16 = converted
res18 = converted

Some files were not shown because too many files have changed in this diff Show More