From 28e99fb7c4e94182918e2f1a1560f219f758c808 Mon Sep 17 00:00:00 2001 From: Zekun Wang Date: Thu, 20 Jun 2024 03:06:27 -0400 Subject: [PATCH] add tests --- .../call_package_fun_from_other_package/Move.compile | 0 .../call_package_fun_from_other_package/Move.toml | 10 ++++++++++ .../call_package_fun_from_other_package/Move.v2_exp | 1 + .../deps_only/Move.toml | 7 +++++++ .../deps_only/sources/B.move | 5 +++++ .../call_package_fun_from_other_package/sources/A.move | 7 +++++++ 6 files changed, 30 insertions(+) create mode 100644 third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.compile create mode 100644 third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.toml create mode 100644 third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.v2_exp create mode 100644 third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/deps_only/Move.toml create mode 100644 third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/deps_only/sources/B.move create mode 100644 third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/sources/A.move diff --git a/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.compile b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.compile new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.toml b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.toml new file mode 100644 index 00000000000000..560ea4772f3691 --- /dev/null +++ b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.toml @@ -0,0 +1,10 @@ +[package] +name = "test" +version = "1.0.0" +authors = [] + +[addresses] +A = "0x42" + +[dependencies] +deps = { local = "./deps_only" } diff --git a/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.v2_exp b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.v2_exp new file mode 100644 index 00000000000000..48fc6a6cf7e3e9 --- /dev/null +++ b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/Move.v2_exp @@ -0,0 +1 @@ +exiting with checking errors diff --git a/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/deps_only/Move.toml b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/deps_only/Move.toml new file mode 100644 index 00000000000000..a12f8c25657311 --- /dev/null +++ b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/deps_only/Move.toml @@ -0,0 +1,7 @@ +[package] +name = "deps" +version = "1.0.0" +authors = [] + +[addresses] +B = "0x42" \ No newline at end of file diff --git a/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/deps_only/sources/B.move b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/deps_only/sources/B.move new file mode 100644 index 00000000000000..4fee08f1bc2e7e --- /dev/null +++ b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/deps_only/sources/B.move @@ -0,0 +1,5 @@ +module B::B { + public(package) fun foo() { + + } +} diff --git a/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/sources/A.move b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/sources/A.move new file mode 100644 index 00000000000000..cfa0ec2996b500 --- /dev/null +++ b/third_party/move/tools/move-package/tests/test_sources/compilation/call_package_fun_from_other_package/sources/A.move @@ -0,0 +1,7 @@ +module A::A { + use B::B; + + fun foo() { + B::foo(); + } +}