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
OpenDAS
dgl
Commits
032a08cc
Unverified
Commit
032a08cc
authored
Feb 13, 2020
by
Jinjing Zhou
Committed by
GitHub
Feb 13, 2020
Browse files
[Test] Fix test script (#1257)
* fix script * t * fix weird bugs * fix * fix
parent
21e79886
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
tests/cpp/test_serialize.cc
tests/cpp/test_serialize.cc
+2
-3
tests/scripts/task_cpp_unit_test.sh
tests/scripts/task_cpp_unit_test.sh
+4
-0
No files found.
tests/cpp/test_serialize.cc
View file @
032a08cc
...
...
@@ -58,8 +58,8 @@ TEST(Serialize, HeteroGraph) {
auto
src
=
VecToIdArray
<
int64_t
>
({
1
,
2
,
5
,
3
});
auto
dst
=
VecToIdArray
<
int64_t
>
({
1
,
6
,
2
,
6
});
auto
mg1
=
dgl
::
UnitGraph
::
CreateFromCOO
(
2
,
9
,
8
,
src
,
dst
);
src
=
VecToIdArray
<
int64_t
>
({
6
,
2
,
5
,
1
,
9
});
dst
=
VecToIdArray
<
int64_t
>
({
5
,
2
,
4
,
9
,
0
});
src
=
VecToIdArray
<
int64_t
>
({
6
,
2
,
5
,
1
,
8
});
dst
=
VecToIdArray
<
int64_t
>
({
5
,
2
,
4
,
8
,
0
});
auto
mg2
=
dgl
::
UnitGraph
::
CreateFromCOO
(
1
,
9
,
9
,
src
,
dst
);
std
::
vector
<
HeteroGraphPtr
>
relgraphs
;
relgraphs
.
push_back
(
mg1
);
...
...
@@ -76,7 +76,6 @@ TEST(Serialize, HeteroGraph) {
dmlc
::
MemoryStringStream
ofs
(
&
blob
);
HeteroGraph
*
gptr
=
dgl
::
Serializer
::
EmptyHeteroGraph
();
static_cast
<
dmlc
::
Stream
*>
(
&
ofs
)
->
Read
(
gptr
);
EXPECT_EQ
(
gptr
->
NumVertices
(
0
),
9
);
EXPECT_EQ
(
gptr
->
NumVertices
(
1
),
8
);
}
\ No newline at end of file
tests/scripts/task_cpp_unit_test.sh
View file @
032a08cc
#!/bin/bash
function
fail
{
echo
FAIL:
$@
exit
-1
}
echo
$PWD
pushd
build
ls
-lh
...
...
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