LeechCraft
0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
detectortest.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#include "
detectortest.h
"
10
#include <QtTest>
11
#include <
detector.h
>
12
13
QTEST_MAIN (
LC::Util::DetectorTest
)
14
15
namespace
LC
16
{
17
namespace
Util
18
{
19
template
<
typename
T>
20
using
DoSmthDetector
=
decltype
(std::declval<T> ().DoSmth (
QString
{}));
21
22
void
DetectorTest::testDetectMember ()
23
{
24
struct
Foo
25
{
26
int
DoSmth (
const
QString&);
27
};
28
29
struct
Bar
30
{
31
void
DoSmth (
int
);
32
};
33
34
static_assert
(
IsDetected_v<DoSmthDetector, Foo>
);
35
static_assert
(!
IsDetected_v<DoSmthDetector, Bar>
);
36
}
37
}
38
}
LC::Util::DetectorTest
Definition
detectortest.h:18
detector.h
detectortest.h
LC::Util::Filter
Container< T > Filter(const Container< T > &c, F f)
Definition
prelude.h:118
LC::Util::DoSmthDetector
decltype(std::declval< T >().DoSmth(QString {})) DoSmthDetector
Definition
detectortest.cpp:20
LC
Definition
constants.h:15
src
util
sll
tests
detectortest.cpp
Generated by
1.10.0