summaryrefslogtreecommitdiff
path: root/scalalib/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scalalib/test/resources')
-rw-r--r--scalalib/test/resources/scalafmt/core/resources/application.conf1
-rw-r--r--scalalib/test/resources/scalafmt/core/src/Main.scala7
-rw-r--r--scalalib/test/resources/scalafmt/core/src/Person.scala12
3 files changed, 20 insertions, 0 deletions
diff --git a/scalalib/test/resources/scalafmt/core/resources/application.conf b/scalalib/test/resources/scalafmt/core/resources/application.conf
new file mode 100644
index 00000000..f5f89257
--- /dev/null
+++ b/scalalib/test/resources/scalafmt/core/resources/application.conf
@@ -0,0 +1 @@
+foo.bar = 2
diff --git a/scalalib/test/resources/scalafmt/core/src/Main.scala b/scalalib/test/resources/scalafmt/core/src/Main.scala
new file mode 100644
index 00000000..a5c74235
--- /dev/null
+++ b/scalalib/test/resources/scalafmt/core/src/Main.scala
@@ -0,0 +1,7 @@
+
+object Main extends App{
+ val person = Person.fromString("rockjam:25")
+ val greeting = s"hello ${person.name}, your age is: ${person.age}"
+ println(greeting)
+}
+
diff --git a/scalalib/test/resources/scalafmt/core/src/Person.scala b/scalalib/test/resources/scalafmt/core/src/Person.scala
new file mode 100644
index 00000000..b296cf85
--- /dev/null
+++ b/scalalib/test/resources/scalafmt/core/src/Person.scala
@@ -0,0 +1,12 @@
+object Person {
+ def fromString(s: String): Person = {
+ val Array(name, age) = s.split(":")
+ Person(
+ name,
+ age.toInt)
+ }
+}
+
+
+
+case class Person(name: String, age: Int)