Frobby 0.9.5
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

◆ MAX_INDEX_TEST

#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); \
} \
}
unsigned int Exponent
Definition stdinc.h:89

Definition at line 145 of file TermGraderTest.cpp.

◆ MIN_INDEX_TEST

#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); \
} \
}

Definition at line 48 of file TermGraderTest.cpp.

Function Documentation

◆ TEST() [1/7]

TEST ( TermGrader ,
getMaxIndexLessThanNegative  )

Definition at line 158 of file TermGraderTest.cpp.

◆ TEST() [2/7]

TEST ( TermGrader ,
getMaxIndexLessThanPositive  )

Definition at line 176 of file TermGraderTest.cpp.

◆ TEST() [3/7]

TEST ( TermGrader ,
getMaxIndexLessThanZero  )

Definition at line 210 of file TermGraderTest.cpp.

◆ TEST() [4/7]

TEST ( TermGrader ,
getMinIndexLessThanNegative  )

Definition at line 61 of file TermGraderTest.cpp.

◆ TEST() [5/7]

TEST ( TermGrader ,
getMinIndexLessThanPositive  )

Definition at line 95 of file TermGraderTest.cpp.

◆ TEST() [6/7]

TEST ( TermGrader ,
getMinIndexLessThanZero  )

Definition at line 121 of file TermGraderTest.cpp.

◆ TEST() [7/7]

TEST ( TermGrader ,
getUpperBound  )

Definition at line 26 of file TermGraderTest.cpp.