ExpTest Class Reference

#include <db/ExpTest.h>

List of all members.


Detailed Description

Definition at line 7 of file ExpTest.h.

Public Member Functions

int countTestCases () const
 ExpTest (std::string name)
virtual void registerTests (CppUnit::TestSuite *suite)
void setUp ()
void tearDown ()
void test99 ()
void testAccumulate ()
void testAddUsedLocs ()
void testAssociativity ()
void testBinaries ()
void testCompare1 ()
void testCompare2 ()
void testCompare3 ()
void testCompare4 ()
void testCompare5 ()
void testCompare6 ()
void testFixSuccessor ()
void testFlt ()
void testIsAfpTerm ()
void testKillFill ()
void testLess ()
void testList ()
void testMapOfExp ()
void testParen ()
void testPartitionTerms ()
void testRegOf2 ()
void testSearch1 ()
void testSearch2 ()
void testSearch3 ()
void testSearchAll ()
void testSearchReplace1 ()
void testSearchReplace2 ()
void testSearchReplace3 ()
void testSearchReplace4 ()
void testSetConscripts ()
void testSimpConstr ()
void testSimplifyAddr ()
void testSimplifyArith ()
void testSimplifyBinary ()
void testSimplifyUnary ()
void testSubscriptVar ()
void testSubscriptVars ()
void testTypeOf ()
void testUnaries ()
void testVisitors ()

Protected Attributes

Constm_99
Locationm_rof2


Constructor & Destructor Documentation

ExpTest::ExpTest std::string  name  )  [inline]
 

Definition at line 13 of file ExpTest.h.


Member Function Documentation

int ExpTest::countTestCases  )  const
 

Definition at line 78 of file ExpTest.cpp.

void ExpTest::registerTests CppUnit::TestSuite *  suite  )  [virtual]
 

Definition at line 33 of file ExpTest.cpp.

References MYTEST, test99(), testAccumulate(), testAddUsedLocs(), testAssociativity(), testBinaries(), testCompare1(), testCompare2(), testCompare3(), testCompare4(), testCompare5(), testCompare6(), testFixSuccessor(), testFlt(), testIsAfpTerm(), testKillFill(), testLess(), testList(), testMapOfExp(), testParen(), testPartitionTerms(), testRegOf2(), testSearch1(), testSearch2(), testSearch3(), testSearchAll(), testSearchReplace1(), testSearchReplace2(), testSearchReplace3(), testSearchReplace4(), testSetConscripts(), testSimpConstr(), testSimplifyAddr(), testSimplifyArith(), testSimplifyBinary(), testSimplifyUnary(), testSubscriptVar(), testSubscriptVars(), testTypeOf(), testUnaries(), and testVisitors().

Referenced by main().

void ExpTest::setUp  ) 
 

Definition at line 88 of file ExpTest.cpp.

References m_99, m_rof2, NULL, and opRegOf.

void ExpTest::tearDown  ) 
 

Definition at line 100 of file ExpTest.cpp.

References m_99, and m_rof2.

void ExpTest::test99  ) 
 

Definition at line 109 of file ExpTest.cpp.

References m_99, and Const::print().

Referenced by registerTests().

void ExpTest::testAccumulate  ) 
 

Definition at line 405 of file ExpTest.cpp.

References Exp::Accumulate(), Location::clone(), Const::clone(), NULL, opAFP, opPlus, and opRegOf.

Referenced by registerTests().

void ExpTest::testAddUsedLocs  ) 
 

Definition at line 1199 of file ExpTest.cpp.

References Exp::addUsedLocs(), LocationSet::clear(), Location::memOf(), opAddrOf, opAt, opMinus, opNil, opPC, opPlus, LocationSet::print(), Location::regOf(), Statement::setNumber(), and LocationSet::size().

Referenced by registerTests().

void ExpTest::testAssociativity  ) 
 

Definition at line 1034 of file ExpTest.cpp.

References Location::memOf(), opPlus, Exp::print(), Location::regOf(), Exp::simplify(), and Exp::simplifyArith().

Referenced by registerTests().

void ExpTest::testBinaries  ) 
 

Definition at line 141 of file ExpTest.cpp.

References Location::clone(), Const::clone(), m_99, m_rof2, opDiv, opDivs, opMinus, opMod, opMods, opMult, opMults, opPlus, and Binary::print().

Referenced by registerTests().

void ExpTest::testCompare1  ) 
 

Definition at line 242 of file ExpTest.cpp.

References m_99, and m_rof2.

Referenced by registerTests().

void ExpTest::testCompare2  ) 
 

Definition at line 245 of file ExpTest.cpp.

References m_99.

Referenced by registerTests().

void ExpTest::testCompare3  ) 
 

Definition at line 249 of file ExpTest.cpp.

References m_99.

Referenced by registerTests().

void ExpTest::testCompare4  ) 
 

Definition at line 253 of file ExpTest.cpp.

References m_rof2, NULL, and opRegOf.

Referenced by registerTests().

void ExpTest::testCompare5  ) 
 

Definition at line 257 of file ExpTest.cpp.

References Location::clone(), Const::clone(), m_99, m_rof2, and opMult.

Referenced by registerTests().

void ExpTest::testCompare6  ) 
 

Definition at line 262 of file ExpTest.cpp.

References Location::clone(), Const::clone(), m_99, m_rof2, and opMult.

Referenced by registerTests().

void ExpTest::testFixSuccessor  ) 
 

Definition at line 968 of file ExpTest.cpp.

References Location::clone(), Const::clone(), Exp::fixSuccessor(), m_99, m_rof2, opMinus, opSuccessor, Exp::print(), and Location::regOf().

Referenced by registerTests().

void ExpTest::testFlt  ) 
 

Definition at line 117 of file ExpTest.cpp.

References Const::print().

Referenced by registerTests().

void ExpTest::testIsAfpTerm  ) 
 

Definition at line 219 of file ExpTest.cpp.

References Const::clone(), Terminal::clone(), Exp::isAfpTerm(), m_99, m_rof2, opAFP, opMinus, opPlus, and opTypedExp.

Referenced by registerTests().

void ExpTest::testKillFill  ) 
 

Definition at line 996 of file ExpTest.cpp.

References Exp::killFill(), Location::memOf(), opPlus, opSgnEx, opZfill, Exp::print(), and Location::regOf().

Referenced by registerTests().

void ExpTest::testLess  ) 
 

Definition at line 812 of file ExpTest.cpp.

References opAFP, opAGP, opAt, opMult, and opNeg.

Referenced by registerTests().

void ExpTest::testList  ) 
 

Definition at line 876 of file ExpTest.cpp.

References NULL, opList, opNil, and opParam.

Referenced by registerTests().

void ExpTest::testMapOfExp  ) 
 

Definition at line 846 of file ExpTest.cpp.

References m, m_99, m_rof2, NULL, opMinus, opMult, opPlus, and opRegOf.

Referenced by registerTests().

void ExpTest::testParen  ) 
 

Definition at line 944 of file ExpTest.cpp.

References NULL, opBitAnd, opMinus, opParam, Assignment::print(), and Location::regOf().

Referenced by registerTests().

void ExpTest::testPartitionTerms  ) 
 

Definition at line 453 of file ExpTest.cpp.

References Exp::Accumulate(), opAFP, opMinus, opPlus, opVar, Exp::partitionTerms(), and size.

Referenced by registerTests().

void ExpTest::testRegOf2  ) 
 

Definition at line 131 of file ExpTest.cpp.

References m_rof2.

Referenced by registerTests().

void ExpTest::testSearch1  ) 
 

Definition at line 337 of file ExpTest.cpp.

References Const::clone(), Location::clone(), m_99, m_rof2, opMult, result, and Exp::search().

Referenced by registerTests().

void ExpTest::testSearch2  ) 
 

Definition at line 354 of file ExpTest.cpp.

References Const::clone(), Location::clone(), m_99, m_rof2, NULL, opDivs, opRegOf, opWild, and result.

Referenced by registerTests().

void ExpTest::testSearch3  ) 
 

Definition at line 367 of file ExpTest.cpp.

References Const::clone(), Location::clone(), m_99, m_rof2, Location::memOf(), NULL, opMemOf, opMult, opPlus, and result.

Referenced by registerTests().

void ExpTest::testSearchAll  ) 
 

Definition at line 386 of file ExpTest.cpp.

References Const::clone(), Location::clone(), m_99, m_rof2, NULL, opMult, opPlus, opRegOf, opWild, Location::regOf(), and result.

Referenced by registerTests().

void ExpTest::testSearchReplace1  ) 
 

Definition at line 272 of file ExpTest.cpp.

References Location::clone(), m_99, m_rof2, opAt, Ternary::print(), Exp::searchReplace(), and Exp::searchReplaceAll().

Referenced by registerTests().

void ExpTest::testSearchReplace2  ) 
 

Definition at line 289 of file ExpTest.cpp.

References m_rof2, and Exp::searchReplace().

Referenced by registerTests().

void ExpTest::testSearchReplace3  ) 
 

Definition at line 303 of file ExpTest.cpp.

References Location::clone(), m_rof2, Exp::print(), and Exp::searchReplaceAll().

Referenced by registerTests().

void ExpTest::testSearchReplace4  ) 
 

Definition at line 317 of file ExpTest.cpp.

References Location::clone(), m_rof2, Exp::print(), and Exp::searchReplaceAll().

Referenced by registerTests().

void ExpTest::testSetConscripts  ) 
 

Definition at line 1157 of file ExpTest.cpp.

References Location::memOf(), NULL, opPlus, Location::regOf(), and Exp::setConscripts().

Referenced by registerTests().

void ExpTest::testSimpConstr  ) 
 

Definition at line 765 of file ExpTest.cpp.

References PointerType::newPtrAlpha(), opAnd, opEquals, opOr, opTypeOf, Exp::print(), and Exp::simplifyConstraint().

Referenced by registerTests().

void ExpTest::testSimplifyAddr  ) 
 

Definition at line 724 of file ExpTest.cpp.

References Location::memOf(), opAddrOf, opAt, opMinus, opSize, Exp::print(), Location::regOf(), and Exp::simplifyAddr().

Referenced by registerTests().

void ExpTest::testSimplifyArith  ) 
 

Definition at line 485 of file ExpTest.cpp.

References Location::memOf(), opAFP, opMinus, opPlus, opVar, Exp::print(), Location::regOf(), and Exp::simplifyArith().

Referenced by registerTests().

void ExpTest::testSimplifyBinary  ) 
 

Definition at line 572 of file ExpTest.cpp.

References Location::clone(), Binary::getSubExp2(), m_rof2, Location::memOf(), opAnd, opBitOr, opBitXor, opEquals, opFalse, opMinus, opMult, opMults, opOr, opPlus, opShiftL, opShiftRA, opTrue, opTypeOf, opVar, Assignment::print(), Exp::print(), Location::regOf(), Assign::simplify(), and Exp::simplify().

Referenced by registerTests().

void ExpTest::testSimplifyUnary  ) 
 

Definition at line 535 of file ExpTest.cpp.

References Const::clone(), opLNot, opNeg, opNot, opVar, and Exp::simplify().

Referenced by registerTests().

void ExpTest::testSubscriptVar  ) 
 

Definition at line 1075 of file ExpTest.cpp.

References Exp::clone(), Location::memOf(), opMinus, opPlus, Location::regOf(), Statement::setNumber(), and Statement::subscriptVar().

Referenced by registerTests().

void ExpTest::testSubscriptVars  ) 
 

Definition at line 1312 of file ExpTest.cpp.

References Exp::clone(), Exp::expSubscriptVar(), Location::memOf(), NULL, opNil, opPC, opPlus, Location::regOf(), Statement::setNumber(), and Location::tempOf().

Referenced by registerTests().

void ExpTest::testTypeOf  ) 
 

Definition at line 1125 of file ExpTest.cpp.

References opEquals, opTypeOf, Location::regOf(), and Statement::setNumber().

Referenced by registerTests().

void ExpTest::testUnaries  ) 
 

Definition at line 195 of file ExpTest.cpp.

References Location::clone(), m_rof2, opCF, opLNot, opNeg, opNot, opZF, and Unary::print().

Referenced by registerTests().

void ExpTest::testVisitors  ) 
 

Definition at line 1399 of file ExpTest.cpp.

References Exp::containsFlags(), Location::memOf(), opFlagCall, opList, opMult, opNil, opPlus, Location::regOf(), and Statement::setNumber().

Referenced by registerTests().


Member Data Documentation

Const* ExpTest::m_99 [protected]
 

Definition at line 9 of file ExpTest.h.

Referenced by setUp(), tearDown(), test99(), testBinaries(), testCompare1(), testCompare2(), testCompare3(), testCompare5(), testCompare6(), testFixSuccessor(), testIsAfpTerm(), testMapOfExp(), testSearch1(), testSearch2(), testSearch3(), testSearchAll(), and testSearchReplace1().

Location* ExpTest::m_rof2 [protected]
 

Definition at line 10 of file ExpTest.h.

Referenced by setUp(), tearDown(), testBinaries(), testCompare1(), testCompare4(), testCompare5(), testCompare6(), testFixSuccessor(), testIsAfpTerm(), testMapOfExp(), testRegOf2(), testSearch1(), testSearch2(), testSearch3(), testSearchAll(), testSearchReplace1(), testSearchReplace2(), testSearchReplace3(), testSearchReplace4(), testSimplifyBinary(), and testUnaries().


The documentation for this class was generated from the following files:
Generated on Tue Sep 19 21:18:42 2006 for Boomerang by  doxygen 1.4.6