aboutsummaryrefslogtreecommitdiff
path: root/bridge/src/sbt-test/source-dependencies/added/test
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-05-31 15:23:04 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-06-07 17:10:36 +0200
commit09b2f39731386cd5b3688d5c3badf75d956d4f6d (patch)
treed122fc0e96d6c1cd22d7e0d0b5ee523563d534e7 /bridge/src/sbt-test/source-dependencies/added/test
parent030ff82070197f0c126f5c0287e076b0f6b6dd8d (diff)
downloaddotty-09b2f39731386cd5b3688d5c3badf75d956d4f6d.tar.gz
dotty-09b2f39731386cd5b3688d5c3badf75d956d4f6d.tar.bz2
dotty-09b2f39731386cd5b3688d5c3badf75d956d4f6d.zip
Make the dotty-bridge sbt project a subproject of dotty
Note that the dotty-bridge tests will not be run automatically by `test` which is short for `dotty/test`, to run the dotty-bridge tests, do in sbt: > dotty-bridge/test > dotty-bridge/scripted Original history: https://github.com/smarter/dotty-bridge/commits/master
Diffstat (limited to 'bridge/src/sbt-test/source-dependencies/added/test')
-rw-r--r--bridge/src/sbt-test/source-dependencies/added/test28
1 files changed, 28 insertions, 0 deletions
diff --git a/bridge/src/sbt-test/source-dependencies/added/test b/bridge/src/sbt-test/source-dependencies/added/test
new file mode 100644
index 000000000..a1ab31849
--- /dev/null
+++ b/bridge/src/sbt-test/source-dependencies/added/test
@@ -0,0 +1,28 @@
+# This test checks that when a source file included in a partial recompilation adds a dependency on
+# a file not included in the partial recompilation, the dependency is properly recorded.
+
+# B and A are independent, so both should compile successfully
+$ copy-file changes/A1.scala src/main/scala/A.scala
+$ copy-file changes/B1.scala src/main/scala/B.scala
+> compile
+
+
+# A now depends on B and to check that it was recompiled, we mismatch the types, which should fail
+$ copy-file changes/A2.scala src/main/scala/A.scala
+-> compile
+
+
+# We now correct the type so that it compiles successfully and this should introduce a dependency from A to B
+$ copy-file changes/A3.scala src/main/scala/A.scala
+> compile
+
+
+# If the dependency from A to B was properly introduced, changing the type of B.y to Int should make
+# the following statement in A a compiler error:
+# val x: String = B.y
+$ copy-file changes/B2.scala src/main/scala/B.scala
+-> compile
+
+# verify this was the correct result by doing a clean+compile
+> clean
+-> compile