"stk::mesh::Selector Unit Testing"


Detailed Description

Selector unit testing environment.


A special set of mesh parts and entities are set up in the following configuration for the Selector unit testing.
Parts: PartA, PartB, PartC, PartD, PartU
PartU = MetaData.universal_part()
Entities: Entity1, Entity2, Entity3, Entity4, Entity5

PartA contains Entity1, Entity2
PartB contains Entity2, Entity3
PartC contains Entity3, Entity4
PartD contains no entities
Entity5 is not contained in any Part

 
 |----------|--|-------|--|----------|    |-------------|  
 |<--PartA---->|       |<--PartC---->|    |   PartD     |  
 |          |<---PartB--->|          |    |             |  
 |  1       |2 |       |3 |       4  | 5  |             |  
 |          |  |       |  |          |    |             |  
 |          |  |       |  |          |    |             |  
 |----------|--|-------|--|----------|    |-------------|  
 

Note: The unit test names use the convention of "i" for intersection, "u" for union, and "c" for complement.


Functions

 STKUNIT_UNIT_TEST (UnitTestSelector, one_SelectorFixture)
 Verify we can construct the selector unit testing fixture.
 STKUNIT_UNIT_TEST (UnitTestSelector, two_SelectorFixture)
 Verify we can construct two selector unit testing fixtures one after another.
 STKUNIT_UNIT_TEST (UnitTestSelector, A_12345)
 Test containment directly.
 STKUNIT_UNIT_TEST (UnitTestSelector, Ac_12345)
 Test containment with the complement.
 STKUNIT_UNIT_TEST (UnitTestSelector, D_5)
 Verify PartD does not contain Entity5.
 STKUNIT_UNIT_TEST (UnitTestSelector, Ac_15)
 Verify PartA.complement contains Entity1 and Entity5.
 STKUNIT_UNIT_TEST (UnitTestSelector, AiB_12)
 Verify (PartA AND PartB) does not contain Entity1 and does contain Entity2.
 STKUNIT_UNIT_TEST (UnitTestSelector, AuB_14)
 Verify (PartA OR PartB) contains Entity1 but not Entity4.
 STKUNIT_UNIT_TEST (UnitTestSelector, AiBc_12)
 Verify !(PartA AND PartB) contains Entity1 but not Entity2.
 STKUNIT_UNIT_TEST (UnitTestSelector, AuBc_13)
 Verify !(PartA OR PartB) contains Entity1 but not Entity3.
 STKUNIT_UNIT_TEST (UnitTestSelector, Ai_BuC_c_12)
 Verify (PartA AND !(PartB OR PartC)) contains Entity1 but not Entity2.
 STKUNIT_UNIT_TEST (UnitTestSelector, defaultConstructor)
 Verify the default constructor does not contain Entity1.
 STKUNIT_UNIT_TEST (UnitTestSelector, flipComplement_AuB_c)
 Verify flipping the complement bit on an OR expression works correctly.
 STKUNIT_UNIT_TEST (UnitTestSelector, flipComplement_AiB_c)
 Verify flipping the complement bit on an AND expression works correctly.
 STKUNIT_UNIT_TEST (UnitTestSelector, complementEmpty)
 Verify flipping the complement bit on an empty Selector works.
 STKUNIT_UNIT_TEST (UnitTestSelector, AuBuCuD)
 Verify the fancy output for (PartA OR PartB OR PartC OR PartD).
 STKUNIT_UNIT_TEST (UnitTestSelector, AiBiC)
 Verify the fancy output for (PartA AND PartB AND PartC).
 STKUNIT_UNIT_TEST (UnitTestSelector, complicated)
 Verify the fancy output for a complex expression.
 STKUNIT_UNIT_TEST (UnitTestSelector, selectIntersection)
 Verify selectIntersection works correctly.
 STKUNIT_UNIT_TEST (UnitTestSelector, selectUnion)
 Verify selectUnion works correctly.
 STKUNIT_UNIT_TEST (UnitTestSelector, orderOfOperations)
 Verify order of operations works correctly.
 STKUNIT_UNIT_TEST (UnitTestSelector, ZeroiuZero)
 Verify unions and intersections of default constructors and their complements.
 STKUNIT_UNIT_TEST (UnitTestSelector, AibA)
 Verify that mesh parts from different meta data objects will throw an exception if combined in an intersection selector.
 STKUNIT_UNIT_TEST (UnitTestSelector, AubA)
 Verify that mesh parts from different meta data objects will throw an exception if combined in a union selector.
 STKUNIT_UNIT_TEST (UnitTestSelector, Ab1)
 Verify that trying to use a bucket from a bulk data that has a different meta data than was used to create the mesh part will throw.
 STKUNIT_UNIT_TEST (UnitTestSelector, ZeroiuA)
 Verify default selectors work well with mesh part instantiated selectors.
 STKUNIT_UNIT_TEST (UnitTestSelector, copyConstructor)
 Verify copy constructed selector creates same pretty print output.
 STKUNIT_UNIT_TEST (UnitTestSelector, AlliuAll)
 Verify pretty printing of default constructors and their complements works well.


Function Documentation

@73::STKUNIT_UNIT_TEST ( UnitTestSelector  ,
A_12345   
) [static]

Test containment directly.

Verify PartA contains Entity1 and Entity2, and does not contain Entity3, Entity4, or Entity5.

Definition at line 96 of file UnitTestSelector.cpp.

@73::STKUNIT_UNIT_TEST ( UnitTestSelector  ,
Ac_12345   
) [static]

Test containment with the complement.

Verify !PartA does not contain Entity1 and Entity2, and does contain Entity3, Entity4, and Entity5.

Definition at line 135 of file UnitTestSelector.cpp.

@73::STKUNIT_UNIT_TEST ( UnitTestSelector  ,
flipComplement_AuB_c   
) [static]

Verify flipping the complement bit on an OR expression works correctly.

Verify !(PartA OR PartB) does not contain Entity1, Entity2, or Entity3, and does contain Entity4. Then check that !!(PartA OR PartB) does contain Entity1, Entity2, and Entity3, and not Entity4.

Definition at line 375 of file UnitTestSelector.cpp.

@73::STKUNIT_UNIT_TEST ( UnitTestSelector  ,
flipComplement_AiB_c   
) [static]

Verify flipping the complement bit on an AND expression works correctly.

Verify !(PartA AND PartB) does not contain Entity2, and does contain Entity1, Entity3, and Entity4. Then check that !!(PartA AND PartB) does contain Entity2, but not Entity1, Entity3, or Entity4.

Definition at line 437 of file UnitTestSelector.cpp.

@73::STKUNIT_UNIT_TEST ( UnitTestSelector  ,
complementEmpty   
) [static]

Verify flipping the complement bit on an empty Selector works.

() does not contain Entity1. !() contains Entity1.

Definition at line 498 of file UnitTestSelector.cpp.

@73::STKUNIT_UNIT_TEST ( UnitTestSelector  ,
orderOfOperations   
) [static]

Verify order of operations works correctly.

(PartA OR PartB AND PartC) = (PartA OR (PartB AND PartC)). (PartB AND PartC OR PartA) = ((PartB AND PartC) OR PartA).

Definition at line 667 of file UnitTestSelector.cpp.

@73::STKUNIT_UNIT_TEST ( UnitTestSelector  ,
ZeroiuA   
) [static]

Verify default selectors work well with mesh part instantiated selectors.

In particular, check that (() OR PartA) contains Entity1 and (!() AND PartA) contains Entity1.

Definition at line 824 of file UnitTestSelector.cpp.

@73::STKUNIT_UNIT_TEST ( UnitTestSelector  ,
AlliuAll   
) [static]

Verify pretty printing of default constructors and their complements works well.

In particular !() AND !() and (!() OR !()) == !(() AND ()).

Definition at line 872 of file UnitTestSelector.cpp.


Generated on Tue Jul 13 09:27:33 2010 for Sierra Toolkit by  doxygen 1.4.7