Skip to content

Commit

Permalink
Update scalafmt-core to 3.0.7 (travisbrown#342)
Browse files Browse the repository at this point in the history
* Update scalafmt-core to 3.0.7

* Reformat with scalafmt 3.0.7
  • Loading branch information
scala-steward authored Oct 21, 2021
1 parent edfd465 commit 5eb1077
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.0.4
version=3.0.7
align.openParenCallSite = true
align.openParenDefnSite = true
maxColumn = 120
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DhallParserSuite extends FunSuite() {
)
// Output from dhall-haskell.
val expectedBytes: Array[Byte] = Array(-126, 24, 28, -125, 24, 26, -125, 0, 100, 76, 105, 115, 116, 103, 78, 97,
116, 117, 114, 97, 108, 100, 84, 121, 112, 101)
116, 117, 114, 97, 108, 100, 84, 121, 112, 101)
val parsed = DhallParser.parse("[]: List Natural: Type")

assert(parsed == expected)
Expand All @@ -27,8 +27,9 @@ class DhallParserSuite extends FunSuite() {
test("parse toMap with empty record with annotation on type") {
// Output from dhall-haskell.
val expectedBytes: Array[Byte] = Array(-125, 24, 27, -126, 7, -96, -125, 24, 26, -125, 0, 100, 76, 105, 115, 116,
-126, 7, -94, 102, 109, 97, 112, 75, 101, 121, 100, 84, 101, 120, 116, 104, 109, 97, 112, 86, 97, 108, 117, 101,
100, 66, 111, 111, 108, 100, 84, 121, 112, 101)
-126, 7, -94, 102, 109, 97, 112, 75, 101, 121, 100, 84, 101, 120, 116, 104,
109, 97, 112, 86, 97, 108, 117, 101, 100, 66, 111, 111, 108, 100, 84, 121,
112, 101)
val parsed = DhallParser.parse("toMap {}: List { mapKey : Text, mapValue: Bool }: Type")

assert(parsed.getEncodedBytes.sameElements(expectedBytes))
Expand All @@ -37,17 +38,19 @@ class DhallParserSuite extends FunSuite() {
test("parse toMap with empty non-record with annotation on type") {
// Output from dhall-haskell.
val expectedBytes: Array[Byte] = Array(-125, 24, 27, -126, 8, -95, 97, 97, -11, -125, 24, 26, -125, 0, 100, 76, 105,
115, 116, -126, 7, -94, 102, 109, 97, 112, 75, 101, 121, 100, 84, 101, 120, 116, 104, 109, 97, 112, 86, 97, 108,
117, 101, 100, 66, 111, 111, 108, 100, 84, 121, 112, 101)
115, 116, -126, 7, -94, 102, 109, 97, 112, 75, 101, 121, 100, 84, 101, 120,
116, 104, 109, 97, 112, 86, 97, 108, 117, 101, 100, 66, 111, 111, 108, 100,
84, 121, 112, 101)
val parsed = DhallParser.parse("toMap {a=True}: List { mapKey : Text, mapValue: Bool }: Type")

assert(parsed.getEncodedBytes.sameElements(expectedBytes))
}

test("parse merge with annotation on type") {
// Output from dhall-haskell.
val expectedBytes: Array[Byte] = Array(-124, 6, -126, 8, -95, 97, 97, -126, 15, 1, -125, 9, -126, 11, -95, 97, 97,
-10, 97, 97, -125, 24, 26, 103, 78, 97, 116, 117, 114, 97, 108, 100, 84, 121, 112, 101)
val expectedBytes: Array[Byte] =
Array(-124, 6, -126, 8, -95, 97, 97, -126, 15, 1, -125, 9, -126, 11, -95, 97, 97, -10, 97, 97, -125, 24, 26, 103,
78, 97, 116, 117, 114, 97, 108, 100, 84, 121, 112, 101)
val parsed = DhallParser.parse("merge {a=1} <a>.a: Natural: Type")

assert(parsed.getEncodedBytes.sameElements(expectedBytes))
Expand Down

0 comments on commit 5eb1077

Please sign in to comment.