Skip to content

Commit 6f931c9

Browse files
committed
refactor: Use generic terms in tests
1 parent 6a74fa2 commit 6f931c9

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

test/corpus/01_primitive_types.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ kill -+._A-Za-z0-9word word_with_underscores "quoted phrase \u0002 🐡" ""
148148
kill my.value_$(type) $(type)_for$(macro)
149149
kill percent.5_0
150150
scoreboard $input.rgb.r example.id.out _.i #name.target_entity
151-
scoreboard players operation #t bs.ctx = $vector.cross_product.u.2 bs.in
152-
scoreboard players operation $vector.cross_product.0 bs.out -= #t bs.ctx
151+
scoreboard players operation #t foo.ctx = $vector.cross_product.u.2 foo.in
152+
scoreboard players operation $vector.cross_product.0 foo.out -= #t foo.ctx
153153
scoreboard players reset * load.status
154-
scoreboard players set #view.looked_entity bs.data 0
154+
scoreboard players set #view.looked_entity foo.data 0
155155
scoreboard players get $$(module).major load.status
156156

157157
say Hello @p[tag=test] :)

test/corpus/02_complex_types.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function #minecraft:load
151151
function ./_my_local_function_01/and/subfunction
152152
function #example:$(macro)/path/%[sub]/to
153153
function #ns.with.dots:function
154-
function bs.dump:interpret/any
154+
function foo.dump:interpret/any
155155

156156
------------------
157157

@@ -243,16 +243,16 @@ data get entity @s Pos[0]
243243
data get entity @s $(macro){foo: bar}
244244
data get entity @s entity.path
245245
data get entity @s container.i
246-
$data modify storage bs:ctx _.v set from storage bs:ctx _.g[{n:"$(name)"}].o[0]
247-
$data modify storage bs:ctx _.v set from storage bs:ctx _.g[{n:"$(name)"}].o[{v:"$(v)"}]
246+
$data modify storage foo:bar _.v set from storage foo:bar _.a[{b:"$(name)"}].o[0]
247+
$data modify storage foo:bar _.v set from storage foo:bar _.a[{b:"$(name)"}].o[{v:"$(v)"}]
248248
data get entity @s entity.path[][]
249-
execute if data storage bs:ctx _.i[-1].by store result score #n bs.ctx run data get storage bs:ctx _.i[-1].by
250-
$execute store result storage bs:out color.hex_to_rgb[0] int 1 store result score $color.hex_to_rgb.r bs.out run data get storage bs:const color.hex_values.$(x)
251-
data modify storage bs:out string.upper set from storage bs:ctx _.1
252-
execute store result storage bs:data vector.distance[0] float 1 run scoreboard players get $vector.length.0 bs.in
253-
$execute store result score $vector.normalize.0 bs.out run data get storage bs:ctx _[0] $(scale)
254-
execute if data storage bs:data xp.stack[-1].var{} run return run function bs.dump:interpret/compound/compound
255-
execute if data entity @s Item.components."minecraft:entity_data".Item.components.minecraft:custom_data.bubblellaneous.block_data
249+
execute if data storage foo:bar _.i[-1].by store result score #n foo.ctx run data get storage foo:ctx _.i[-1].by
250+
$execute store result storage foo:out color.hex_to_rgb[0] int 1 store result score $color.hex_to_rgb.r foo.out run data get storage foo:const color.hex_values.$(x)
251+
data modify storage foo:out string.upper set from storage foo:ctx _.1
252+
execute store result storage foo:data vector.distance[0] float 1 run scoreboard players get $vector.length.0 foo.in
253+
$execute store result score $vector.normalize.0 foo.out run data get storage foo:ctx _[0] $(scale)
254+
execute if data storage foo:data xp.stack[-1].var{} run return run function foo.dump:interpret/compound/compound
255+
execute if data entity @s Item.components."minecraft:entity_data".Item.components.minecraft:custom_data.namespace.block_data
256256

257257
------------------
258258

@@ -676,7 +676,7 @@ data {\
676676
abc: {value: false} \
677677
}
678678
data modify block ~ ~ ~ RecordItem.tag set value { messages: [hi, bye] }
679-
data modify storage bs:const color.hex_values set value {00:0,01:1,5b:91,5c:92,5d:93,5e:94,5f:95}
679+
data modify storage foo:const color.hex_values set value {00:0,01:1,5b:91,5c:92,5d:93,5e:94,5f:95}
680680
data {frame:{$(frame):{pose:"test"}}}
681681

682682
------------------
@@ -875,7 +875,7 @@ item stone[foo=bar]
875875
item #stone
876876
item #stone[foo=bar]
877877
give armor_stand[entity_data={id:"minecraft:armor_stand", Tags:[taco_sauce]}]
878-
give *[!custom_data~{bubblellaneous: {is_gui: true}}]
878+
give *[!custom_data~{namespace: {is_gui: true}}]
879879
give *[minecraft:dyed_color]
880880
give *[minecraft:consumable|food]
881881
give *[!minecraft:food,!minecraft:consumable]
@@ -1302,10 +1302,10 @@ execute as @a[advancements={minecraft:story/obtain_armor={iron_helmet=true, gold
13021302
execute as @a[advancements={minecraft:story/form_obsidian=true, minecraft:story/follow_ender_eye=true}]
13031303
execute as @a[advancements={minecraft:story/form_obsidian={foo=true, bar=false},minecraft:story/follow_ender_eye={foo=false, bar=true}}]
13041304

1305-
clear @s #bubblellaneous:gui_item[custom_data~{bubblellaneous: {is_gui: 1b}}]
1305+
clear @s #namespace:gui_item[custom_data~{namespace: {is_gui: 1b}}]
13061306
$particle item $(base_item)[minecraft:custom_model_data=$(custom_model_data)]
13071307

1308-
execute if entity @s[scores={bs.width=0..,bs.height=0..,bs.depth=0..}] run return run function bs.hitbox:get_entity/get_custom
1308+
execute if entity @s[scores={foo.width=0..,foo.height=0..,foo.depth=0..}] run return run function foo.hitbox:get_entity/get_custom
13091309
tellraw @s [{"text": "Hi!"}]
13101310

13111311
------------------

0 commit comments

Comments
 (0)