Skip to content

Commit 6fe084e

Browse files
author
Owen Jones
committed
Update tests to work with CSVSA-driven lazy loading
1 parent b1bbdb0 commit 6fe084e

File tree

7 files changed

+5
-23
lines changed

7 files changed

+5
-23
lines changed

regression/LVSA/TestEVS/Test$A.class

0 Bytes
Binary file not shown.

regression/LVSA/TestEVS/Test$B.class

0 Bytes
Binary file not shown.

regression/LVSA/TestEVS/Test$C.class

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

regression/LVSA/TestEVS/Test.class

644 Bytes
Binary file not shown.

regression/LVSA/TestEVS/Test.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ public void write_to_field_of_B_through_A(B b, Node node_parameter) {
7070
static_node = b.node;
7171
}
7272

73+
// Do not test this function directly as it gives quite different results when
74+
// using CSVSA-driven lazy loading
7375
public void call_overridden_method_on_A(A a) {
7476
a.node = new Node();
7577
static_node = a.get_special_node();

regression/LVSA/TestEVS/test_evs.py

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,6 @@ def test_write_to_field_of_B_through_A(tmpdir):
101101
decl_on_types=['LVSA.TestEVS.Test$A'])
102102

103103

104-
def test_call_overridden_method_on_A(tmpdir):
105-
lvsa_driver = LvsaDriver(tmpdir, folder_name).with_test_function('call_overridden_method_on_A')
106-
lvsa_expectation = lvsa_driver.run()
107-
108-
value_set_expectation = lvsa_expectation.get_value_set_for_public_static('static_node')
109-
110-
value_set_expectation.check_number_of_values(4)
111-
value_set_expectation.check_contains_dynamic_object()
112-
value_set_expectation.check_contains_precise_evs(label_suffix='a', access_path=['.extra_node'],
113-
decl_on_types=['LVSA.TestEVS.Test$B'])
114-
value_set_expectation.check_contains_per_field_evs(access_path=['.node'], decl_on_types=['LVSA.TestEVS.Test$A'])
115-
value_set_expectation.check_contains_per_field_evs(access_path=['.extra_node'],
116-
decl_on_types=['LVSA.TestEVS.Test$B'])
117-
118-
119104
def test_apply_call_overridden_method_on_A_with_A(tmpdir):
120105
lvsa_driver = LvsaDriver(tmpdir, folder_name).with_test_function('apply_call_overridden_method_on_A_with_A')
121106
lvsa_expectation = lvsa_driver.run()
@@ -133,8 +118,7 @@ def test_apply_call_overridden_method_on_A_with_B(tmpdir):
133118

134119
value_set_expectation = lvsa_expectation.get_value_set_for_public_static('static_node')
135120

136-
value_set_expectation.check_number_of_values(3)
137-
value_set_expectation.check_contains_dynamic_object()
121+
# Only test for what's important as CSVSA-driven-lazy-loading changes the results
138122
value_set_expectation.check_contains_null_object()
139123
value_set_expectation.check_contains_root_object_evs(label_suffix='static_node')
140124

@@ -145,8 +129,7 @@ def test_apply_call_overridden_method_on_A_with_C(tmpdir):
145129

146130
value_set_expectation = lvsa_expectation.get_value_set_for_public_static('static_node')
147131

148-
value_set_expectation.check_number_of_values(3)
149-
value_set_expectation.check_contains_dynamic_object()
132+
# Only test for what's important as CSVSA-driven-lazy-loading changes the results
150133
value_set_expectation.check_contains_null_object()
151134
value_set_expectation.check_contains_root_object_evs(label_suffix='static_node')
152135

@@ -179,12 +162,9 @@ def test_call_overridden_method_on_C_upcast_to_A(tmpdir):
179162

180163
value_set_expectation = lvsa_expectation.get_value_set_for_public_static('static_node')
181164

182-
value_set_expectation.check_number_of_values(4)
165+
# Only test for what's important as CSVSA-driven-lazy-loading changes the results
183166
value_set_expectation.check_contains_dynamic_object()
184167
value_set_expectation.check_contains_per_field_evs(access_path=['.extra_node'])
185-
value_set_expectation.check_contains_precise_evs(label_suffix='c', access_path=['.node'],
186-
decl_on_types=['LVSA.TestEVS.Test$A'])
187-
value_set_expectation.check_contains_per_field_evs(access_path=['.node'])
188168

189169

190170
def test_call_function_with_B_parameter_with_C_argument(tmpdir):

0 commit comments

Comments
 (0)