ArmNN
 20.02
QuantizeHelperTest.cpp File Reference
#include <QuantizeHelper.hpp>
#include <armnn/utility/IgnoreUnused.hpp>
#include <boost/test/unit_test.hpp>
#include <vector>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (IsFloatIterFuncTest)
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( IsFloatIterFuncTest  )

Definition at line 27 of file QuantizeHelperTest.cpp.

References BOOST_AUTO_TEST_SUITE_END().

28 {
29  std::vector<float> fArray;
30  BOOST_TEST(IsFloatIterFunc(fArray.begin()) == true);
31  BOOST_TEST(IsFloatIterFunc(fArray.cbegin()) == true);
32 
33  std::vector<double> dArray;
34  BOOST_TEST(IsFloatIterFunc(dArray.begin()) == true);
35 
36  std::vector<int> iArray;
37  BOOST_TEST(IsFloatIterFunc(iArray.begin()) == false);
38 
39  float floats[5];
40  BOOST_TEST(IsFloatIterFunc(&floats[0]) == true);
41 
42  int ints[5];
43  BOOST_TEST(IsFloatIterFunc(&ints[0]) == false);
44 }