Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F19250965
test_Functors.cc
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
644 B
Referenced Files
None
Subscribers
None
test_Functors.cc
View Options
#include
"UnitTest++.h"
#include
"test_utils.hh"
#include
"npstat/nm/SimpleFunctors.hh"
using
namespace
npstat
;
namespace
{
struct
Dummy
:
public
Functor1
<
int
,
int
>
{
int
operator
()(
const
int
&
i
)
const
{
return
i
;}
};
struct
Dummy2
:
public
Functor1
<
void
,
int
>
{
void
operator
()(
const
int
&
)
const
{}
};
struct
Dummy3
:
public
Functor0
<
void
>
{
void
operator
()()
const
{}
};
TEST
(
Functor1
)
{
Dummy
d
;
CHECK_EQUAL
(
3
,
d
(
3
));
Dummy2
d2
;
d2
(
3
);
Dummy3
d3
;
d3
();
FcnFunctor0
<
double
>
f0
(
test_rng
);
f0
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Tue, Sep 30, 5:45 AM (13 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
6548164
Default Alt Text
test_Functors.cc (644 B)
Attached To
Mode
rNPSTATSVN npstatsvn
Attached
Detach File
Event Timeline
Log In to Comment