Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
d12838be
"vscode:/vscode.git/clone" did not exist on "6d92959ad3642754d0f6de85388a922d33651578"
Commit
d12838be
authored
May 02, 2018
by
Paul
Browse files
Add operation test
parent
b452c7f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
test/operation.cpp
test/operation.cpp
+26
-0
No files found.
test/operation.cpp
0 → 100644
View file @
d12838be
#include <rtg/operation.hpp>
#include <sstream>
#include <string>
#include "test.hpp"
struct
simple_operation
{
std
::
string
name
()
const
{
return
"simple"
;
}
rtg
::
shape
compute_shape
(
std
::
vector
<
rtg
::
shape
>
)
const
{
RTG_THROW
(
"not computable"
);
}
rtg
::
argument
compute
(
std
::
vector
<
rtg
::
argument
>
)
const
{
RTG_THROW
(
"not computable"
);
}
};
void
operation_copy_test
()
{
simple_operation
s
{};
rtg
::
operation
op1
=
s
;
// NOLINT
rtg
::
operation
op2
=
op1
;
// NOLINT
EXPECT
(
s
.
name
()
==
op1
.
name
());
EXPECT
(
op2
.
name
()
==
op1
.
name
());
}
int
main
()
{
operation_copy_test
();
}
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