Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dynamic-graph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Stack Of Tasks
dynamic-graph
Commits
6ccf3b9b
Commit
6ccf3b9b
authored
5 years ago
by
Bergé
Browse files
Options
Downloads
Patches
Plain Diff
command-test was already created
parent
4271a05a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/command.cpp
+0
-83
0 additions, 83 deletions
tests/command.cpp
with
0 additions
and
83 deletions
tests/command.cpp
deleted
100644 → 0
+
0
−
83
View file @
4271a05a
//
// Created by corentin on 7/3/19.
//
#include
<boost/foreach.hpp>
#include
<dynamic-graph/debug.h>
#include
<dynamic-graph/entity.h>
#include
<dynamic-graph/factory.h>
#include
<dynamic-graph/signal-array.h>
#include
<dynamic-graph/command-bind.h>
#include
<dynamic-graph/tracer.h>
#include
<assert.h>
#include
<boost/test/unit_test.hpp>
#include
<boost/test/output_test_stream.hpp>
#define BOOST_TEST_MODULE signal_array
using
boost
::
test_tools
::
output_test_stream
;
dynamicgraph
::
SignalArray_const
<
double
>
sig
;
using
namespace
std
;
using
namespace
dynamicgraph
;
using
namespace
dynamicgraph
::
command
;
template
<
class
E
>
struct
CV0
:
public
dynamicgraph
::
command
::
CommandVoid0
<
E
>
{
public:
CV0
(
E
&
entity
,
boost
::
function
<
void
(
void
)
>
function
,
const
std
::
string
&
docString
)
:
dynamicgraph
::
command
::
CommandVoid0
<
E
>
(
entity
,
function
,
docString
),
test
(
function
)
{};
void
Exec
()
{
dynamicgraph
::
command
::
CommandVoid0
<
E
>::
doExecute
();
}
private
:
boost
::
function
<
void
(
void
)
>
test
;
};
template
<
class
E
>
CV0
<
E
>*
makeCV0
(
E
&
entity
,
boost
::
function
<
void
(
void
)
>
function
,
const
std
::
string
&
docString
)
{
return
new
CV0
<
E
>
(
entity
,
function
,
docString
);
}
Tracer
::
Tracer
(
const
std
::
string
n
)
:
Entity
(
n
)
,
toTraceSignals
()
,
traceStyle
(
TRACE_STYLE_DEFAULT
)
,
frequency
(
1
)
,
basename
()
,
suffix
(
".dat"
)
,
rootdir
()
,
namesSet
(
false
)
,
files
()
,
names
()
,
play
(
false
)
,
timeStart
(
0
)
,
triger
(
boost
::
bind
(
&
Tracer
::
recordTrigger
,
this
,
_1
,
_2
),
sotNOSIGNAL
,
"Tracer("
+
n
+
")::triger"
)
{
std
::
string
doc
;
doc
=
docCommandVoid0
(
"test"
);
addCommand
(
"clear"
,
makeCV0
(
*
this
,
&
Tracer
::
clearSignalToTrace
,
doc
));
}
BOOST_AUTO_TEST_CASE
(
test
)
{
output_test_stream
test
;
test
<<
"1"
;
BOOST_CHECK
(
test
.
is_equal
(
"1"
));
}
\ No newline at end of file
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