ArmNN
 22.05
QuantizeHelperTest.cpp File Reference
#include <armnnUtils/QuantizeHelper.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
#include <doctest/doctest.h>
#include <vector>

Go to the source code of this file.

Functions

 TEST_SUITE ("QuantizeHelper")
 

Function Documentation

◆ TEST_SUITE()

TEST_SUITE ( "QuantizeHelper"  )

Definition at line 13 of file QuantizeHelperTest.cpp.

References armnn::IgnoreUnused().

14 {
15 namespace
16 {
17 
18 template<typename T>
19 bool IsFloatIterFunc(T iter)
20 {
21  armnn::IgnoreUnused(iter);
23 }
24 
25 } // anonymous namespace
26 
27 TEST_CASE("IsFloatIterFuncTest")
28 {
29  std::vector<float> fArray;
30  CHECK(IsFloatIterFunc(fArray.begin()) == true);
31  CHECK(IsFloatIterFunc(fArray.cbegin()) == true);
32 
33  std::vector<double> dArray;
34  CHECK(IsFloatIterFunc(dArray.begin()) == true);
35 
36  std::vector<int> iArray;
37  CHECK(IsFloatIterFunc(iArray.begin()) == false);
38 
39  float floats[5];
40  CHECK(IsFloatIterFunc(&floats[0]) == true);
41 
42  int ints[5];
43  CHECK(IsFloatIterFunc(&ints[0]) == false);
44 }
45 
46 }
void IgnoreUnused(Ts &&...)