Frobby  0.9.0
Macros | Functions
TermGraderTest.cpp File Reference
#include "stdinc.h"
#include "TermGrader.h"
#include "tests.h"
#include "TermTranslator.h"
#include "Term.h"

Go to the source code of this file.

Macros

#define MIN_INDEX_TEST(from, to, maxDegree, strict, expectFind, expectedIndex)
 
#define MAX_INDEX_TEST(from, to, maxDegree, strict, expectFind, expectedIndex)
 

Functions

 TEST (TermGrader, getUpperBound)
 
 TEST (TermGrader, getMinIndexLessThanNegative)
 
 TEST (TermGrader, getMinIndexLessThanPositive)
 
 TEST (TermGrader, getMinIndexLessThanZero)
 
 TEST (TermGrader, getMaxIndexLessThanNegative)
 
 TEST (TermGrader, getMaxIndexLessThanPositive)
 
 TEST (TermGrader, getMaxIndexLessThanZero)
 

Macro Definition Documentation

#define MAX_INDEX_TEST (   from,
  to,
  maxDegree,
  strict,
  expectFind,
  expectedIndex 
)
Value:
{ \
Exponent foundIndex = 0; \
bool returnValue = grader.getMaxIndexLessThan \
(0, from, to, foundIndex, maxDegree - strict); \
if (expectFind) { \
ASSERT_TRUE(returnValue); \
ASSERT_EQ(foundIndex, (Exponent)expectedIndex); \
} else { \
ASSERT_FALSE(returnValue); \
} \
}
#define ASSERT_EQ(A, B)
Definition: asserts.h:147
#define ASSERT_TRUE(VALUE)
Definition: asserts.h:72
#define ASSERT_FALSE(VALUE)
Definition: asserts.h:119
unsigned int Exponent
Definition: stdinc.h:88

Definition at line 145 of file TermGraderTest.cpp.

#define MIN_INDEX_TEST (   from,
  to,
  maxDegree,
  strict,
  expectFind,
  expectedIndex 
)
Value:
{ \
Exponent foundIndex = 0; \
bool returnValue = grader.getMinIndexLessThan \
(0, from, to, foundIndex, maxDegree - strict); \
if (expectFind) { \
ASSERT_TRUE(returnValue); \
ASSERT_EQ(foundIndex, (Exponent)expectedIndex); \
} else { \
ASSERT_FALSE(returnValue); \
} \
}
#define ASSERT_EQ(A, B)
Definition: asserts.h:147
#define ASSERT_TRUE(VALUE)
Definition: asserts.h:72
#define ASSERT_FALSE(VALUE)
Definition: asserts.h:119
unsigned int Exponent
Definition: stdinc.h:88

Definition at line 48 of file TermGraderTest.cpp.

Function Documentation

TEST ( TermGrader  ,
getUpperBound   
)

Definition at line 26 of file TermGraderTest.cpp.

TEST ( TermGrader  ,
getMinIndexLessThanNegative   
)

Definition at line 61 of file TermGraderTest.cpp.

TEST ( TermGrader  ,
getMinIndexLessThanPositive   
)

Definition at line 95 of file TermGraderTest.cpp.

TEST ( TermGrader  ,
getMinIndexLessThanZero   
)

Definition at line 121 of file TermGraderTest.cpp.

TEST ( TermGrader  ,
getMaxIndexLessThanNegative   
)

Definition at line 158 of file TermGraderTest.cpp.

TEST ( TermGrader  ,
getMaxIndexLessThanPositive   
)

Definition at line 176 of file TermGraderTest.cpp.

TEST ( TermGrader  ,
getMaxIndexLessThanZero   
)

Definition at line 210 of file TermGraderTest.cpp.