Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove in-place union operator |= UI test cases. #155

Merged
merged 1 commit into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions kclvm/runner/src/exec_data/aug_assign.k
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ schema Data:
}
}

_alice.name |= {last: "value"}
_alice.name.age += 1
alice = _alice

Expand All @@ -26,6 +25,5 @@ _alice = A {
}
}

_alice.name |= {last: "value"}
_alice.name.age += 1
alice = _alice
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ schema Config:
[str]: str

_c = Config {}
_c |= {
_c: Config {
key = "value"
}
c = _c
4 changes: 2 additions & 2 deletions test/grammar/multi_file_compilation/simple/simple_2/pkg.k
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_list_data |= [1]
_dict_data |= {"key2": "value2"}
_list_data = [1]
_dict_data = {"key2": "value2"}
list_data = _list_data
dict_data = _dict_data
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ var: 1
list_data:
- 1
dict_data:
key1: value1
key2: value2
2 changes: 1 addition & 1 deletion test/grammar/schema/index_signature/normal_4/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema S:
_s: S {
a += [1]
}
_s |= {
_s: S {
b += [1]
}
s = _s
2 changes: 1 addition & 1 deletion test/grammar/schema/init/init_if_expr_1/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ schema Person:
info?: {str: int|str}

schema InfoMixin:
info |= {"age": age} if age else {}
info = {"age": age} if age else {}

alice = Person {
"name": "alice",
Expand Down
2 changes: 1 addition & 1 deletion test/grammar/schema/init/init_if_expr_1/stdout.golden
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ alice:
name: alice
age: 10
info:
gender: girl
age: 10
gender: girl
John:
name: john
age: null
Expand Down
33 changes: 0 additions & 33 deletions test/grammar/schema/init/init_if_expr_2/main.k

This file was deleted.

9 changes: 0 additions & 9 deletions test/grammar/schema/init/init_if_expr_2/stdout.golden

This file was deleted.

36 changes: 0 additions & 36 deletions test/grammar/schema/init/init_if_expr_3/main.k

This file was deleted.

6 changes: 0 additions & 6 deletions test/grammar/schema/init/init_if_expr_3/stdout.golden

This file was deleted.

36 changes: 0 additions & 36 deletions test/grammar/schema/init/init_if_expr_4/main.k

This file was deleted.

6 changes: 0 additions & 6 deletions test/grammar/schema/init/init_if_expr_4/stdout.golden

This file was deleted.

12 changes: 0 additions & 12 deletions test/grammar/schema/init/init_outside_var_1/main.k

This file was deleted.

11 changes: 0 additions & 11 deletions test/grammar/schema/init/init_outside_var_1/stdout.golden

This file was deleted.

44 changes: 0 additions & 44 deletions test/grammar/schema/irrelevant_order/complex_4/main.k

This file was deleted.

11 changes: 0 additions & 11 deletions test/grammar/schema/irrelevant_order/complex_4/stdout.golden

This file was deleted.

2 changes: 1 addition & 1 deletion test/grammar/schema/irrelevant_order/for_2/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ schema Data:
data: {str:str} = {
"key1": "value1"
}
data |= {
data = {
"key2": "value2"
}
dataOther = {**data}
Expand Down
3 changes: 0 additions & 3 deletions test/grammar/schema/irrelevant_order/for_2/stdout.golden
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
data:
keys:
- key1
- key2
data:
key1: value1
key2: value2
dataOther:
key1: value1
key2: value2
2 changes: 1 addition & 1 deletion test/grammar/schema/irrelevant_order/inherit_4/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ schema AppConfig(Config):
name: str = "app"

if overQuota:
labels |= {
labels = {
"key1": "value1"
"key2": "value2"
}
Expand Down
4 changes: 2 additions & 2 deletions test/grammar/schema/irrelevant_order/inherit_5/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ schema AppConfig(Config):
name: str = "app"

if overQuota:
labels |= {
labels = {
"key1": "value1"
}
if overQuota:
labels |= {
labels = {
"key2": "value2"
}

Expand Down
2 changes: 0 additions & 2 deletions test/grammar/schema/irrelevant_order/inherit_5/stdout.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ appConfig:
name: app
help: app
labels:
key1: value1
key2: value2
metaLabels:
key1: value1
key2: value2
overQuota: true
appName: myApp
2 changes: 1 addition & 1 deletion test/grammar/schema/irrelevant_order/mixin_2/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schema Data:
metaLabels: {str:} = labels

schema DataMixin:
labels |= {
labels = {
"key": "value"
}

Expand Down
2 changes: 1 addition & 1 deletion test/grammar/schema/irrelevant_order/mixin_3/main.k
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
schema ConfigMixin:
output: str = option("output") or "default_output"
data |= {"output": output}
data = {"output": output}

schema Config:
mixin [ConfigMixin]
Expand Down
21 changes: 0 additions & 21 deletions test/grammar/schema/mixin/schema_field_change_dict/main.k

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions test/grammar/schema/mixin/schema_field_union_list/main.k

This file was deleted.

Loading