Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core to 3.8.2 #316

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Scala Steward: Reformat with scalafmt 3.7.5
a599d16bf210a097a9b95fea06d96944752f2d9c

# Scala Steward: Reformat with scalafmt 3.8.2
a92ccbb81c858d333d0d6f290e5b3569a8522bd4
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.1
version = 3.8.2
runner.dialect = scala213
preset = defaultWithAlign
maxColumn = 120
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,15 @@ class TraversableSpec extends FunSpec {

it("unzip3 ... 要素を3つのコレクションに分割する") {
assert(
List((1, "one", "hoge"), (2, "two", "foo"), (3, "three", "bar")).unzip3 == (List(1, 2, 3), List(
"one",
"two",
"three"
), List("hoge", "foo", "bar"))
List((1, "one", "hoge"), (2, "two", "foo"), (3, "three", "bar")).unzip3 == (
List(1, 2, 3),
List(
"one",
"two",
"three"
),
List("hoge", "foo", "bar")
)
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ class Chapter06Spec extends FunSpec with Matchers {

intDouble(SimpleRNG(10)) shouldBe ((3847489, 0.6213264381513), SimpleRNG(87443922374356L))
doubleInt(SimpleRNG(10)) shouldBe ((0.0017916266806423664, 1334288366), SimpleRNG(87443922374356L))
double3(SimpleRNG(10)) shouldBe ((0.0017916266806423664, 0.6213264381513, 0.6923740776255727), SimpleRNG(
97442988689487L
))
double3(SimpleRNG(10)) shouldBe (
(0.0017916266806423664, 0.6213264381513, 0.6923740776255727),
SimpleRNG(
97442988689487L
)
)
}

it("[EXERCISE 6.4] ランダムな整数のリストを作成する関数") {
Expand Down Expand Up @@ -177,9 +180,12 @@ class Chapter06Spec extends FunSpec with Matchers {
flatMap(ra)(a => map(rb)(b => f(a, b)))

map(int)(_.toString)(SimpleRNG(10)) shouldBe ("3847489", SimpleRNG(252149039181L))
map2(int, double)((i, d) => s"$i:$d")(SimpleRNG(10)) shouldBe ("3847489:0.6213264381513", SimpleRNG(
87443922374356L
))
map2(int, double)((i, d) => s"$i:$d")(SimpleRNG(10)) shouldBe (
"3847489:0.6213264381513",
SimpleRNG(
87443922374356L
)
)
}

describe("6.5 状態アクションデータ型の一般化") {
Expand Down Expand Up @@ -233,9 +239,12 @@ class Chapter06Spec extends FunSpec with Matchers {

val rand: Rand[Int] = State(int)
rand.map(i => i.toString).run(SimpleRNG(10)) shouldBe ("3847489", SimpleRNG(252149039181L))
rand.map2(State(double))((i, d) => s"$i:$d").run(SimpleRNG(10)) shouldBe ("3847489:0.6213264381513", SimpleRNG(
87443922374356L
))
rand.map2(State(double))((i, d) => s"$i:$d").run(SimpleRNG(10)) shouldBe (
"3847489:0.6213264381513",
SimpleRNG(
87443922374356L
)
)
rand.flatMap(i => State.unit(i.toString)).run(SimpleRNG(10)) shouldBe ("3847489", SimpleRNG(252149039181L))
}
}
Expand Down
Loading