ArmNN
 21.02
Constant.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "armnnTfParser/ITfParser.hpp"
#include "ParserPrototxtFixture.hpp"

Go to the source code of this file.

Typedefs

using ConstantSingleValueListFixture = ConstantValueListFixture< 1 >
 
using ConstantMultipleValueListFixture = ConstantValueListFixture< 4 >
 
using ConstantMaxValueListFixture = ConstantValueListFixture< 6 >
 
using ConstantCreateNoValueListFixture = ConstantCreateFixture< true, false, true >
 
using ConstantCreateNoValueList2Fixture = ConstantCreateFixture< true, false, false >
 
using ConstantCreateNoContentFixture = ConstantCreateFixture< true, true, false >
 
using ConstantCreateNoContent2Fixture = ConstantCreateFixture< true, false, false >
 
using ConstantCreateNoShapeFixture = ConstantCreateFixture< false, false, false >
 
using ConstantCreateNoShape2Fixture = ConstantCreateFixture< false, true, false >
 
using ConstantCreateNoShape3Fixture = ConstantCreateFixture< false, false, true >
 

Functions

 BOOST_FIXTURE_TEST_CASE (Constant, ConstantFixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantReused, ConstantReusedFixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantSingleValueList, ConstantSingleValueListFixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantMultipleValueList, ConstantMultipleValueListFixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantMaxValueList, ConstantMaxValueListFixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantCreateInvalidValueList, ConstantCreateNoValueListFixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantCreateInvalidValueList2, ConstantCreateNoValueList2Fixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantCreateInvalidContent, ConstantCreateNoContentFixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantCreateInvalidShape, ConstantCreateNoShapeFixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantCreateNoShape2, ConstantCreateNoShape2Fixture)
 
 BOOST_FIXTURE_TEST_CASE (ConstantCreateNoShape3, ConstantCreateNoShape3Fixture)
 

Typedef Documentation

◆ ConstantCreateNoContent2Fixture

using ConstantCreateNoContent2Fixture = ConstantCreateFixture<true, false, false>

Definition at line 290 of file Constant.cpp.

◆ ConstantCreateNoContentFixture

using ConstantCreateNoContentFixture = ConstantCreateFixture<true, true, false>

Definition at line 289 of file Constant.cpp.

◆ ConstantCreateNoShape2Fixture

using ConstantCreateNoShape2Fixture = ConstantCreateFixture<false, true, false>

Definition at line 292 of file Constant.cpp.

◆ ConstantCreateNoShape3Fixture

using ConstantCreateNoShape3Fixture = ConstantCreateFixture<false, false, true>

Definition at line 293 of file Constant.cpp.

◆ ConstantCreateNoShapeFixture

using ConstantCreateNoShapeFixture = ConstantCreateFixture<false, false, false>

Definition at line 291 of file Constant.cpp.

◆ ConstantCreateNoValueList2Fixture

using ConstantCreateNoValueList2Fixture = ConstantCreateFixture<true, false, false>

Definition at line 288 of file Constant.cpp.

◆ ConstantCreateNoValueListFixture

using ConstantCreateNoValueListFixture = ConstantCreateFixture<true, false, true>

Definition at line 287 of file Constant.cpp.

◆ ConstantMaxValueListFixture

using ConstantMaxValueListFixture = ConstantValueListFixture<6>

Definition at line 196 of file Constant.cpp.

◆ ConstantMultipleValueListFixture

using ConstantMultipleValueListFixture = ConstantValueListFixture<4>

Definition at line 195 of file Constant.cpp.

◆ ConstantSingleValueListFixture

using ConstantSingleValueListFixture = ConstantValueListFixture<1>

Definition at line 194 of file Constant.cpp.

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/11]

BOOST_FIXTURE_TEST_CASE ( Constant  ,
ConstantFixture   
)

Definition at line 85 of file Constant.cpp.

86 {
87  RunTest<1>({1}, {18});
88 }

◆ BOOST_FIXTURE_TEST_CASE() [2/11]

BOOST_FIXTURE_TEST_CASE ( ConstantReused  ,
ConstantReusedFixture   
)

Definition at line 142 of file Constant.cpp.

143 {
144  RunTest<1>({}, { { "output", { 34 } } });
145 }

◆ BOOST_FIXTURE_TEST_CASE() [3/11]

BOOST_FIXTURE_TEST_CASE ( ConstantSingleValueList  ,
ConstantSingleValueListFixture   
)

Definition at line 198 of file Constant.cpp.

199 {
200  RunTest<2>({}, { { "output", { 0.75f, 0.75f, 0.75f, 0.75f, 0.75f, 0.75f } } });
201 }

◆ BOOST_FIXTURE_TEST_CASE() [4/11]

BOOST_FIXTURE_TEST_CASE ( ConstantMultipleValueList  ,
ConstantMultipleValueListFixture   
)

Definition at line 202 of file Constant.cpp.

203 {
204  RunTest<2>({}, { { "output", { 0.75f, 1.f, 1.25f, 1.5f, 1.5f, 1.5f } } });
205 }

◆ BOOST_FIXTURE_TEST_CASE() [5/11]

BOOST_FIXTURE_TEST_CASE ( ConstantMaxValueList  ,
ConstantMaxValueListFixture   
)

Definition at line 206 of file Constant.cpp.

207 {
208  RunTest<2>({}, { { "output", { 0.75f, 1.f, 1.25f, 1.50f, 1.75f, 2.f } } });
209 }

◆ BOOST_FIXTURE_TEST_CASE() [6/11]

BOOST_FIXTURE_TEST_CASE ( ConstantCreateInvalidValueList  ,
ConstantCreateNoValueListFixture   
)

Definition at line 295 of file Constant.cpp.

296 {
297  BOOST_REQUIRE_THROW(Setup({}, { "output" }), armnn::ParseException);
298 }

◆ BOOST_FIXTURE_TEST_CASE() [7/11]

BOOST_FIXTURE_TEST_CASE ( ConstantCreateInvalidValueList2  ,
ConstantCreateNoValueList2Fixture   
)

Definition at line 299 of file Constant.cpp.

300 {
301  BOOST_REQUIRE_THROW(Setup({}, { "output" }), armnn::ParseException);
302 }

◆ BOOST_FIXTURE_TEST_CASE() [8/11]

BOOST_FIXTURE_TEST_CASE ( ConstantCreateInvalidContent  ,
ConstantCreateNoContentFixture   
)

Definition at line 303 of file Constant.cpp.

304 {
305  BOOST_REQUIRE_THROW(Setup({}, { "output" }), armnn::ParseException);
306 }

◆ BOOST_FIXTURE_TEST_CASE() [9/11]

BOOST_FIXTURE_TEST_CASE ( ConstantCreateInvalidShape  ,
ConstantCreateNoShapeFixture   
)

Definition at line 307 of file Constant.cpp.

308 {
309  BOOST_REQUIRE_THROW(Setup({}, { "output" }), armnn::ParseException);
310 }

◆ BOOST_FIXTURE_TEST_CASE() [10/11]

BOOST_FIXTURE_TEST_CASE ( ConstantCreateNoShape2  ,
ConstantCreateNoShape2Fixture   
)

Definition at line 311 of file Constant.cpp.

312 {
313  BOOST_REQUIRE_THROW(Setup({}, { "output" }), armnn::ParseException);
314 }

◆ BOOST_FIXTURE_TEST_CASE() [11/11]

BOOST_FIXTURE_TEST_CASE ( ConstantCreateNoShape3  ,
ConstantCreateNoShape3Fixture   
)

Definition at line 315 of file Constant.cpp.

References BOOST_AUTO_TEST_SUITE_END().

316 {
317  Setup({}, { "output" });
318  RunTest<1>({}, { { "output", { 1.f, 1.f, 1.f, 1.f, 1.f } } });
319 }