Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
8addb9d5
Commit
8addb9d5
authored
Jul 10, 2018
by
Paul
Browse files
Add more tests
parent
e1a12af0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
test/validate.cpp
test/validate.cpp
+25
-0
No files found.
test/validate.cpp
View file @
8addb9d5
#include <migraph/program.hpp>
#include <migraph/instruction.hpp>
#include <basic_ops.hpp>
#include <test.hpp>
...
...
@@ -26,8 +27,32 @@ void out_of_order()
EXPECT
(
bool
{
p
.
validate
()
==
ins
});
}
void
incomplete_args
()
{
migraph
::
program
p
;
auto
one
=
p
.
add_literal
(
1
);
auto
two
=
p
.
add_literal
(
2
);
auto
ins
=
p
.
add_instruction
(
sum_op
{},
one
,
two
);
ins
->
clear_arguments
();
EXPECT
(
bool
{
p
.
validate
()
==
ins
});
}
void
invalid_args
()
{
migraph
::
program
p
;
auto
one
=
p
.
add_literal
(
1
);
auto
two
=
p
.
add_literal
(
2
);
auto
ins
=
p
.
add_instruction
(
sum_op
{},
one
,
two
);
ins
->
arguments
.
clear
();
EXPECT
(
bool
{
p
.
validate
()
==
p
.
begin
()});
}
int
main
()
{
simple_test
();
out_of_order
();
incomplete_args
();
invalid_args
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment