-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy paths12_kotlin_test.py
35 lines (26 loc) · 1.53 KB
/
s12_kotlin_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import unittest
from scenario_test_support import *
class S12KotlinTest(unittest.TestCase):
maxDiff = None
archive = load_archive("12_kotlin/intellij_files")
parent_iml_content = archive["12_kotlin/parent/parent.iml"]
child_iml_content = archive["12_kotlin/child/child.iml"]
def test_kotlin_facet(self):
self.assertEqual(["Kotlin"], xpath_attribute_list(self.parent_iml_content, "./component/facet", "name"))
self.assertEqual(["Kotlin"], xpath_attribute_list(self.child_iml_content, "./component/facet", "name"))
def test_source_folders(self):
expected = [
"jar://${BAZEL_INFO_EXECUTION_ROOT}/external/com_google_guava_guava/jar/guava-19.0.jar!/",
"jar://${BAZEL_INFO_EXECUTION_ROOT}/external/com_github_jetbrains_kotlin/lib/kotlin-stdlib.jar!/",
]
self.assertEqual(expected, find_all_plain_jar_libraries(self.child_iml_content))
self.assertEqual(expected, find_all_plain_jar_libraries(self.parent_iml_content))
def test_module_dependencies(self):
self.assertEqual(["parent"],
xpath_attribute_list(self.child_iml_content,
"./component/orderEntry[@type='module']",
"module-name"))
self.assertEqual([],
xpath_attribute_list(self.parent_iml_content,
"./component/orderEntry[@type='module']",
"module-name"))