Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
big-brain
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Louis
big-brain
Commits
94e1b1f6
Commit
94e1b1f6
authored
3 years ago
by
Kat Marchán
Browse files
Options
Downloads
Patches
Plain Diff
fix(tests): update tests
parent
edecc4c9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/steps.rs
+8
-13
8 additions, 13 deletions
tests/steps.rs
with
8 additions
and
13 deletions
tests/steps.rs
+
8
−
13
View file @
94e1b1f6
...
@@ -28,12 +28,12 @@ fn setup(mut cmds: Commands) {
...
@@ -28,12 +28,12 @@ fn setup(mut cmds: Commands) {
);
);
}
}
#[derive(
Clone,
Component,
Debug,
Default)]
#[derive(Component,
Debug,
Default)]
struct
Action1
;
struct
Action1
;
impl
ActionBuilder
for
Action1
{
impl
ActionBuilder
for
Action1
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
cmd
.entity
(
action
)
cmd
.entity
(
action
)
.insert
(
s
elf
.clone
()
)
.insert
(
S
elf
)
.insert
(
ActionState
::
Requested
);
.insert
(
ActionState
::
Requested
);
}
}
}
}
...
@@ -50,12 +50,12 @@ fn action1(mut query: Query<(&Actor, &mut ActionState), With<Action1>>) {
...
@@ -50,12 +50,12 @@ fn action1(mut query: Query<(&Actor, &mut ActionState), With<Action1>>) {
}
}
}
}
#[derive(
Clone,
Component,
Debug,
Default)]
#[derive(Component,
Debug,
Default)]
struct
Action2
;
struct
Action2
;
impl
ActionBuilder
for
Action2
{
impl
ActionBuilder
for
Action2
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
cmd
.entity
(
action
)
cmd
.entity
(
action
)
.insert
(
s
elf
.clone
()
)
.insert
(
S
elf
)
.insert
(
ActionState
::
Requested
);
.insert
(
ActionState
::
Requested
);
}
}
}
}
...
@@ -72,12 +72,12 @@ fn action2(mut query: Query<(&Actor, &mut ActionState), With<Action2>>) {
...
@@ -72,12 +72,12 @@ fn action2(mut query: Query<(&Actor, &mut ActionState), With<Action2>>) {
}
}
}
}
#[derive(
Clone,
Component,
Debug,
Default)]
#[derive(Component,
Debug,
Default)]
struct
ExitAction
;
struct
ExitAction
;
impl
ActionBuilder
for
ExitAction
{
impl
ActionBuilder
for
ExitAction
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
cmd
.entity
(
action
)
cmd
.entity
(
action
)
.insert
(
s
elf
.clone
()
)
.insert
(
S
elf
)
.insert
(
ActionState
::
Requested
);
.insert
(
ActionState
::
Requested
);
}
}
}
}
...
@@ -101,12 +101,12 @@ fn last() {
...
@@ -101,12 +101,12 @@ fn last() {
println!
();
println!
();
}
}
#[derive(
Clone,
Component,
Debug,
Default)]
#[derive(Component,
Debug,
Default)]
struct
FailureAction
;
struct
FailureAction
;
impl
ActionBuilder
for
FailureAction
{
impl
ActionBuilder
for
FailureAction
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
cmd
.entity
(
action
)
cmd
.entity
(
action
)
.insert
(
s
elf
.clone
()
)
.insert
(
S
elf
)
.insert
(
ActionState
::
Requested
);
.insert
(
ActionState
::
Requested
);
}
}
}
}
...
@@ -134,11 +134,6 @@ struct GlobalState {
...
@@ -134,11 +134,6 @@ struct GlobalState {
#[derive(Clone,
Component,
Debug)]
#[derive(Clone,
Component,
Debug)]
struct
NoFailureScore
;
struct
NoFailureScore
;
impl
ScorerBuilder
for
NoFailureScore
{
fn
build
(
&
self
,
cmd
:
&
mut
Commands
,
action
:
Entity
,
_actor
:
Entity
)
{
cmd
.entity
(
action
)
.insert
(
self
.clone
());
}
}
fn
no_failure_score
(
fn
no_failure_score
(
mut
query
:
Query
<
(
&
NoFailureScore
,
&
mut
Score
)
>
,
mut
query
:
Query
<
(
&
NoFailureScore
,
&
mut
Score
)
>
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment