Updates to corpus + generator.
parent
8b79fdd866
commit
9399ad7f27
|
@ -232,7 +232,12 @@ module CeleryScriptSettingsBag
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
package: {
|
package: {
|
||||||
defn: [e(:ALLOWED_PACKAGES)],
|
defn: [v(:string)],
|
||||||
|
# `package` has an ambiguous intent depending on who is using the arg
|
||||||
|
# (FBOS vs. API). Corpus-native enums cannot be used for validation
|
||||||
|
# outside of the API. If `package` _was_ declared as a native enum (rather
|
||||||
|
# than a string), it would cause false type errors in FE/FBJS.
|
||||||
|
blk: -> (node) { manual_enum(ALLOWED_PACKAGES, node, BAD_PACKAGE) },
|
||||||
},
|
},
|
||||||
axis: {
|
axis: {
|
||||||
defn: [e(:ALLOWED_AXIS)],
|
defn: [e(:ALLOWED_AXIS)],
|
||||||
|
@ -281,12 +286,13 @@ module CeleryScriptSettingsBag
|
||||||
change_ownership: {
|
change_ownership: {
|
||||||
body: [:pair],
|
body: [:pair],
|
||||||
tags: [:function, :network_user, :disk_user, :cuts_power, :api_writer],
|
tags: [:function, :network_user, :disk_user, :cuts_power, :api_writer],
|
||||||
docs: "Not a commonly used node. May be removed without notice."
|
blk: -> (node) { raise "Never." },
|
||||||
|
docs: "Not a commonly used node. May be removed without notice.",
|
||||||
},
|
},
|
||||||
channel: {
|
channel: {
|
||||||
args: [:channel_name],
|
args: [:channel_name],
|
||||||
tags: [:data],
|
tags: [:data],
|
||||||
docs: "Specifies a communication path for log messages."
|
docs: "Specifies a communication path for log messages.",
|
||||||
},
|
},
|
||||||
check_updates: {
|
check_updates: {
|
||||||
args: [:package],
|
args: [:package],
|
||||||
|
@ -294,11 +300,11 @@ module CeleryScriptSettingsBag
|
||||||
},
|
},
|
||||||
coordinate: {
|
coordinate: {
|
||||||
args: [:x, :y, :z],
|
args: [:x, :y, :z],
|
||||||
tags: [:data, :location_like]
|
tags: [:data, :location_like],
|
||||||
},
|
},
|
||||||
dump_info: {
|
dump_info: {
|
||||||
tags: [:function, :network_user, :disk_user, :api_writer],
|
tags: [:function, :network_user, :disk_user, :api_writer],
|
||||||
docs: "Sends an info dump to server administrators for troubleshooting."
|
docs: "Sends an info dump to server administrators for troubleshooting.",
|
||||||
},
|
},
|
||||||
emergency_lock: {
|
emergency_lock: {
|
||||||
tags: [:function, :firmware_user, :control_flow],
|
tags: [:function, :firmware_user, :control_flow],
|
||||||
|
@ -309,7 +315,7 @@ module CeleryScriptSettingsBag
|
||||||
every_point: {
|
every_point: {
|
||||||
args: [:every_point_type],
|
args: [:every_point_type],
|
||||||
tags: [:data, :list_like, :control_flow],
|
tags: [:data, :list_like, :control_flow],
|
||||||
docs: "Experimental node used for iteration."
|
docs: "Experimental node used for iteration.",
|
||||||
},
|
},
|
||||||
execute_script: {
|
execute_script: {
|
||||||
args: [:label],
|
args: [:label],
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
WARNING_HEADER = \
|
WARNING_HEADER =
|
||||||
"""
|
"" "
|
||||||
// THIS INTERFACE WAS AUTO GENERATED ON #{Date.today}
|
// THIS INTERFACE WAS AUTO GENERATED ON #{Date.today}
|
||||||
// DO NOT EDIT THIS FILE.
|
// DO NOT EDIT THIS FILE.
|
||||||
// IT WILL BE OVERWRITTEN ON EVERY CELERYSCRIPT UPGRADE.
|
// IT WILL BE OVERWRITTEN ON EVERY CELERYSCRIPT UPGRADE.
|
||||||
|
|
||||||
"""
|
" ""
|
||||||
HASH = Sequence::Corpus.as_json({})
|
HASH = Sequence::Corpus.as_json({})
|
||||||
OUTPUT = [WARNING_HEADER]
|
OUTPUT = [WARNING_HEADER]
|
||||||
FILE_PATH = "latest_corpus.ts"
|
FILE_PATH = "latest_corpus.ts"
|
||||||
|
@ -21,18 +21,18 @@ ARGS = HASH
|
||||||
.reduce(HashWithIndifferentAccess.new) do |acc, arg|
|
.reduce(HashWithIndifferentAccess.new) do |acc, arg|
|
||||||
acc[arg.fetch("name").to_s] = arg
|
acc[arg.fetch("name").to_s] = arg
|
||||||
acc
|
acc
|
||||||
end
|
end
|
||||||
NODES = HASH.fetch(:nodes)
|
NODES = HASH.fetch(:nodes)
|
||||||
NODE_START = [ "export type %{camel_case}BodyItem = %{body_types};",
|
NODE_START = ["export type %{camel_case}BodyItem = %{body_types};",
|
||||||
"/** %{docs} %{tag_docs} */",
|
"/** %{snake_case}\n%{docs}\n %{tag_docs} */",
|
||||||
"export interface %{camel_case} {",
|
"export interface %{camel_case} {",
|
||||||
" comment?: string | undefined;",
|
" comment?: string | undefined;",
|
||||||
' kind: "%{snake_case}";',
|
' kind: "%{snake_case}";',
|
||||||
" args: {", ].join("\n")
|
" args: {"].join("\n")
|
||||||
MIDDLE_CENTER = " %{arg_name}: %{arg_values};"
|
MIDDLE_CENTER = " %{arg_name}: %{arg_values};"
|
||||||
BOTTOM_END = [ " }",
|
BOTTOM_END = [" }",
|
||||||
" body?: %{camel_case}BodyItem[] | undefined;",
|
" body?: %{camel_case}BodyItem[] | undefined;",
|
||||||
"}\n", ].join("\n")
|
"}\n"].join("\n")
|
||||||
CONSTANT_DECLR_HACK = {
|
CONSTANT_DECLR_HACK = {
|
||||||
LATEST_VERSION: Sequence::LATEST_VERSION,
|
LATEST_VERSION: Sequence::LATEST_VERSION,
|
||||||
DIGITAL: CeleryScriptSettingsBag::DIGITAL,
|
DIGITAL: CeleryScriptSettingsBag::DIGITAL,
|
||||||
|
@ -40,6 +40,8 @@ CONSTANT_DECLR_HACK = {
|
||||||
}
|
}
|
||||||
CONSTANT_DECLR_HACK_TPL = "export const %{name} = %{value};\n"
|
CONSTANT_DECLR_HACK_TPL = "export const %{name} = %{value};\n"
|
||||||
PUBLIC_NODES = [] # Filled at runtime
|
PUBLIC_NODES = [] # Filled at runtime
|
||||||
|
PIPE = " |\n"
|
||||||
|
|
||||||
def emit_constants()
|
def emit_constants()
|
||||||
CONSTANT_DECLR_HACK.map do |(name, value)|
|
CONSTANT_DECLR_HACK.map do |(name, value)|
|
||||||
konst = CONSTANT_DECLR_HACK_TPL % { name: name, value: value }
|
konst = CONSTANT_DECLR_HACK_TPL % { name: name, value: value }
|
||||||
|
@ -77,7 +79,7 @@ end
|
||||||
def emit_enums
|
def emit_enums
|
||||||
output = ENUMS.map do |enum|
|
output = ENUMS.map do |enum|
|
||||||
name = name_of(enum)
|
name = name_of(enum)
|
||||||
type = enum.fetch("allowed_values").sort.map(&:inspect).uniq.join(" | ")
|
type = enum.fetch("allowed_values").sort.map(&:inspect).uniq.join(PIPE)
|
||||||
FUNNY_NAMES[name] = name
|
FUNNY_NAMES[name] = name
|
||||||
ENUM_TPL % { name: name, type: type }
|
ENUM_TPL % { name: name, type: type }
|
||||||
end
|
end
|
||||||
|
@ -100,14 +102,14 @@ def emit_nodes()
|
||||||
.uniq
|
.uniq
|
||||||
.map(&:to_s)
|
.map(&:to_s)
|
||||||
.map(&:camelize)
|
.map(&:camelize)
|
||||||
bt = bodies.any? ? "(#{bodies.join(" | ")})" : "never"
|
bt = bodies.any? ? "(#{bodies.join(PIPE)})" : "never"
|
||||||
PUBLIC_NODES.push(name.camelize)
|
PUBLIC_NODES.push(name.camelize)
|
||||||
tpl_binding = {
|
tpl_binding = {
|
||||||
body_types: bt,
|
body_types: bt,
|
||||||
camel_case: name.camelize,
|
camel_case: name.camelize,
|
||||||
docs: node.fetch("docs"),
|
docs: node.fetch("docs"),
|
||||||
snake_case: name,
|
snake_case: name,
|
||||||
tag_docs: "Tag properties: #{tag_list}."
|
tag_docs: "Tag properties: #{tag_list}.",
|
||||||
}
|
}
|
||||||
|
|
||||||
one = NODE_START % tpl_binding
|
one = NODE_START % tpl_binding
|
||||||
|
@ -118,7 +120,7 @@ def emit_nodes()
|
||||||
.fetch("allowed_values")
|
.fetch("allowed_values")
|
||||||
.map(&:name)
|
.map(&:name)
|
||||||
.map { |x| FUNNY_NAMES[x] || x.camelize }
|
.map { |x| FUNNY_NAMES[x] || x.camelize }
|
||||||
.join(" | ")
|
.join(PIPE),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
three = BOTTOM_END % tpl_binding
|
three = BOTTOM_END % tpl_binding
|
||||||
|
@ -131,10 +133,11 @@ def emit_nodes()
|
||||||
end
|
end
|
||||||
|
|
||||||
def emit_misc()
|
def emit_misc()
|
||||||
types = PUBLIC_NODES.sort.uniq.join(" | ")
|
types = PUBLIC_NODES.sort.uniq.join(PIPE)
|
||||||
tpl = "export type CeleryNode = #{types};\n"
|
tpl = "export type CeleryNode = #{types};\n"
|
||||||
add_to_output(tpl)
|
add_to_output(tpl)
|
||||||
end
|
end
|
||||||
|
|
||||||
emit_constants()
|
emit_constants()
|
||||||
emit_values()
|
emit_values()
|
||||||
emit_enums()
|
emit_enums()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require 'spec_helper'
|
require "spec_helper"
|
||||||
|
|
||||||
describe CeleryScript::Checker do
|
describe CeleryScript::Checker do
|
||||||
let(:device) { FactoryBot.create(:device) }
|
let(:device) { FactoryBot.create(:device) }
|
||||||
|
@ -7,10 +7,10 @@ describe CeleryScript::Checker do
|
||||||
kind: "sequence",
|
kind: "sequence",
|
||||||
args: {
|
args: {
|
||||||
locals: Sequence::SCOPE_DECLARATION,
|
locals: Sequence::SCOPE_DECLARATION,
|
||||||
version: 0
|
version: 0,
|
||||||
},
|
},
|
||||||
comment: "Properly formatted, syntactically valid sequence.",
|
comment: "Properly formatted, syntactically valid sequence.",
|
||||||
body: sequence_body_for(FakeSequence.create())
|
body: sequence_body_for(FakeSequence.create()),
|
||||||
}.deep_symbolize_keys
|
}.deep_symbolize_keys
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ describe CeleryScript::Checker do
|
||||||
it "runs through a syntactically valid program" do
|
it "runs through a syntactically valid program" do
|
||||||
outcome = checker.run!
|
outcome = checker.run!
|
||||||
expect(outcome).to be_kind_of(CeleryScript::AstNode)
|
expect(outcome).to be_kind_of(CeleryScript::AstNode)
|
||||||
expect(outcome.comment).to eq("Properly formatted, syntactically valid"\
|
expect(outcome.comment).to eq("Properly formatted, syntactically valid" \
|
||||||
" sequence.")
|
" sequence.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -57,10 +57,10 @@ describe CeleryScript::Checker do
|
||||||
expect(checker.run).to be_kind_of(CeleryScript::TypeCheckError)
|
expect(checker.run).to be_kind_of(CeleryScript::TypeCheckError)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'handles wrong leaf types' do
|
it "handles wrong leaf types" do
|
||||||
hash[:body][0][:args][:location][:args][:x] = "supposed to be an Integer"
|
hash[:body][0][:args][:location][:args][:x] = "supposed to be an Integer"
|
||||||
result = checker.run
|
result = checker.run
|
||||||
expect(result.message).to eq("Expected leaf 'x' within 'coordinate' to be "\
|
expect(result.message).to eq("Expected leaf 'x' within 'coordinate' to be " \
|
||||||
"one of: [Integer, Float] but got String")
|
"one of: [Integer, Float] but got String")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -76,10 +76,8 @@ describe CeleryScript::Checker do
|
||||||
{ kind: "execute", args: { sequence_id: 0 } },
|
{ kind: "execute", args: { sequence_id: 0 } },
|
||||||
]
|
]
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
expect(chk.valid?)
|
expect(chk.valid?).to be false
|
||||||
.to be false
|
expect(chk.error.message).to eq("missing a sequence selection for `execute` block.")
|
||||||
expect(chk.error.message)
|
|
||||||
.to eq("missing a sequence selection for `execute` block.")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it "validates peripheral presence" do
|
it "validates peripheral presence" do
|
||||||
|
@ -91,13 +89,13 @@ describe CeleryScript::Checker do
|
||||||
kind: "named_pin",
|
kind: "named_pin",
|
||||||
args: {
|
args: {
|
||||||
pin_type: "Peripheral",
|
pin_type: "Peripheral",
|
||||||
pin_id: 0
|
pin_id: 0,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
pin_mode: CeleryScriptSettingsBag::ANALOG,
|
pin_mode: CeleryScriptSettingsBag::ANALOG,
|
||||||
label: "FOO"
|
label: "FOO",
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
expect(chk.valid?).to be false
|
expect(chk.valid?).to be false
|
||||||
|
@ -113,10 +111,10 @@ describe CeleryScript::Checker do
|
||||||
label: "pin",
|
label: "pin",
|
||||||
pin_number: {
|
pin_number: {
|
||||||
kind: "named_pin",
|
kind: "named_pin",
|
||||||
args: { pin_type: "Not correct", pin_id: 1 }
|
args: { pin_type: "Not correct", pin_id: 1 },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
expect(chk.valid?).to be false
|
expect(chk.valid?).to be false
|
||||||
|
@ -132,10 +130,10 @@ describe CeleryScript::Checker do
|
||||||
label: "pin",
|
label: "pin",
|
||||||
pin_number: {
|
pin_number: {
|
||||||
kind: "named_pin",
|
kind: "named_pin",
|
||||||
args: { pin_type: "Peripheral", pin_id: 900 }
|
args: { pin_type: "Peripheral", pin_id: 900 },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
expect(chk.valid?).to be false
|
expect(chk.valid?).to be false
|
||||||
|
@ -151,10 +149,10 @@ describe CeleryScript::Checker do
|
||||||
pin_mode: 0,
|
pin_mode: 0,
|
||||||
pin_number: {
|
pin_number: {
|
||||||
kind: "named_pin",
|
kind: "named_pin",
|
||||||
args: { pin_type: ["BoxLed3", "BoxLed4"].sample, pin_id: 41 }
|
args: { pin_type: ["BoxLed3", "BoxLed4"].sample, pin_id: 41 },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
expect(chk.valid?).to be true
|
expect(chk.valid?).to be true
|
||||||
|
@ -169,17 +167,16 @@ describe CeleryScript::Checker do
|
||||||
pin_mode: CeleryScriptSettingsBag::ANALOG,
|
pin_mode: CeleryScriptSettingsBag::ANALOG,
|
||||||
pin_number: {
|
pin_number: {
|
||||||
kind: "named_pin",
|
kind: "named_pin",
|
||||||
args: { pin_type: ["BoxLed3", "BoxLed4"].sample, pin_id: 41 }
|
args: { pin_type: ["BoxLed3", "BoxLed4"].sample, pin_id: 41 },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
expect(chk.valid?).to be false
|
expect(chk.valid?).to be false
|
||||||
expect(chk.error.message).to include(CeleryScriptSettingsBag::CANT_ANALOG)
|
expect(chk.error.message).to include(CeleryScriptSettingsBag::CANT_ANALOG)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
it 'gives human-friendly names to "BoxLed3", "BoxLed4"' do
|
it 'gives human-friendly names to "BoxLed3", "BoxLed4"' do
|
||||||
hash[:body] = [
|
hash[:body] = [
|
||||||
{
|
{
|
||||||
|
@ -189,30 +186,28 @@ describe CeleryScript::Checker do
|
||||||
pin_mode: CeleryScriptSettingsBag::DIGITAL,
|
pin_mode: CeleryScriptSettingsBag::DIGITAL,
|
||||||
pin_number: {
|
pin_number: {
|
||||||
kind: "named_pin",
|
kind: "named_pin",
|
||||||
args: { pin_type: ["BoxLed3", "BoxLed4"].sample, pin_id: 0 }
|
args: { pin_type: ["BoxLed3", "BoxLed4"].sample, pin_id: 0 },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
expect(chk.valid?).to be false
|
expect(chk.valid?).to be false
|
||||||
expected = \
|
expected =
|
||||||
CeleryScriptSettingsBag::NO_PIN_ID % CeleryScriptSettingsBag::BoxLed.name
|
CeleryScriptSettingsBag::NO_PIN_ID % CeleryScriptSettingsBag::BoxLed.name
|
||||||
expect(chk.error.message).to eq(expected)
|
expect(chk.error.message).to eq(expected)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
it "catches bad `axis` nodes" do
|
it "catches bad `axis` nodes" do
|
||||||
t = \
|
t =
|
||||||
CeleryScript::AstNode.new({kind: "home", args: { speed: 100, axis: "?" }})
|
CeleryScript::AstNode.new({ kind: "home", args: { speed: 100, axis: "?" } })
|
||||||
chk = CeleryScript::Checker.new(t, corpus, device)
|
chk = CeleryScript::Checker.new(t, corpus, device)
|
||||||
expect(chk.valid?).to be false
|
expect(chk.valid?).to be false
|
||||||
expect(chk.error.message).to include("not a valid axis")
|
expect(chk.error.message).to include("not a valid axis")
|
||||||
end
|
end
|
||||||
|
|
||||||
it "catches bad `package` nodes" do
|
it "catches bad `package` nodes" do
|
||||||
t = \
|
t = CeleryScript::AstNode.new({ kind: "factory_reset", args: { package: "?" } })
|
||||||
CeleryScript::AstNode.new({ kind: "factory_reset", args: { package: "?" }})
|
|
||||||
chk = CeleryScript::Checker.new(t, corpus, device)
|
chk = CeleryScript::Checker.new(t, corpus, device)
|
||||||
expect(chk.valid?).to be false
|
expect(chk.valid?).to be false
|
||||||
expect(chk.error.message).to include("not a valid package")
|
expect(chk.error.message).to include("not a valid package")
|
||||||
|
@ -225,7 +220,7 @@ describe CeleryScript::Checker do
|
||||||
version: 20180209,
|
version: 20180209,
|
||||||
locals: {
|
locals: {
|
||||||
kind: "scope_declaration",
|
kind: "scope_declaration",
|
||||||
:args=>{},
|
:args => {},
|
||||||
body: [
|
body: [
|
||||||
{
|
{
|
||||||
kind: "parameter_declaration",
|
kind: "parameter_declaration",
|
||||||
|
@ -233,11 +228,12 @@ describe CeleryScript::Checker do
|
||||||
label: "parent",
|
label: "parent",
|
||||||
default_value: {
|
default_value: {
|
||||||
kind: "coordinate",
|
kind: "coordinate",
|
||||||
args: { x: 0, y: 0, z: 0 } }
|
args: { x: 0, y: 0, z: 0 },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
},
|
||||||
}
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
{
|
{
|
||||||
|
@ -245,10 +241,10 @@ describe CeleryScript::Checker do
|
||||||
args: {
|
args: {
|
||||||
speed: 100,
|
speed: 100,
|
||||||
location: { kind: "identifier", args: { label: "parent" } },
|
location: { kind: "identifier", args: { label: "parent" } },
|
||||||
offset: { kind: "coordinate", args: { x: 0, y: 0, z: 0} }
|
offset: { kind: "coordinate", args: { x: 0, y: 0, z: 0 } },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
tree = CeleryScript::AstNode.new(ast)
|
tree = CeleryScript::AstNode.new(ast)
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
|
@ -262,7 +258,7 @@ describe CeleryScript::Checker do
|
||||||
version: 20180209,
|
version: 20180209,
|
||||||
locals: {
|
locals: {
|
||||||
kind: "scope_declaration",
|
kind: "scope_declaration",
|
||||||
:args=>{},
|
:args => {},
|
||||||
body: [
|
body: [
|
||||||
{
|
{
|
||||||
kind: "parameter_declaration",
|
kind: "parameter_declaration",
|
||||||
|
@ -270,12 +266,12 @@ describe CeleryScript::Checker do
|
||||||
label: "parent",
|
label: "parent",
|
||||||
default_value: {
|
default_value: {
|
||||||
kind: "nothing",
|
kind: "nothing",
|
||||||
args: { }
|
args: {},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
{
|
{
|
||||||
|
@ -283,10 +279,10 @@ describe CeleryScript::Checker do
|
||||||
args: {
|
args: {
|
||||||
speed: 100,
|
speed: 100,
|
||||||
location: { kind: "identifier", args: { label: "parent" } },
|
location: { kind: "identifier", args: { label: "parent" } },
|
||||||
offset: { kind: "coordinate", args: { x: 0, y: 0, z: 0} }
|
offset: { kind: "coordinate", args: { x: 0, y: 0, z: 0 } },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
tree = CeleryScript::AstNode.new(ast)
|
tree = CeleryScript::AstNode.new(ast)
|
||||||
chk = CeleryScript::Checker.new(tree, corpus, device)
|
chk = CeleryScript::Checker.new(tree, corpus, device)
|
||||||
|
|
Loading…
Reference in New Issue