RawSquareFreeTermTest.cpp File Reference
`#include "stdinc.h"`
`#include "RawSquareFreeTerm.h"`
`#include "tests.h"`

Go to the source code of this file.

## Macros

#define | TEST_COMPACT(A, B, C)

## Functions

| TEST (RawSquareFreeTerm, getWordCount)
| TEST (RawSquareFreeTerm, SetAndGetExponent)
| TEST (RawSquareFreeTerm, Assign)
| TEST (RawSquareFreeTerm, HasFullSupport)
| TEST (RawSquareFreeTerm, IsIdentity)
| TEST (RawSquareFreeTerm, GetSizeOfSupport)
| TEST (RawSquareFreeTerm, SetToIdentity)
| TEST (RawSquareFreeTerm, SetToAllVarProd)
| TEST (RawSquareFreeTerm, IsRelativelyPrime)
| TEST (RawSquareFreeTerm, Lcm)
| TEST (RawSquareFreeTerm, Gcd)
| TEST (RawSquareFreeTerm, Colon)
| TEST (RawSquareFreeTerm, Divides)
| TEST (RawSquareFreeTerm, LexLess)
| TEST (RawSquareFreeTerm, Invert)
| TEST (RawSquareFreeTerm, GetVarIfPure)
| TEST (RawSquareFreeTerm, IsValid)
| TEST (RawSquareFreeTerm, NewTermParse)
| TEST (RawSquareFreeTerm, Equals)
| TEST (RawSquareFreeTerm, Compact)

## Macro Definition Documentation

## TEST_COMPACT

#define TEST_COMPACT | ( |  | A,
|  |  | B,
|  |  | C )

Value:
{ \
size_t varCount = strlen(A); \
Word* a = newTermParse(A); \
Word* b = newTermParse(B); \
Word* c = newTermParse(C); \
size_t varCountAfter = strlen(C); \
Word* d = newTerm(varCountAfter); \
compact(d, a, b, varCount); \
ASSERT_TRUE(equals(d, c, varCountAfter)); \
compact(a, a, b, varCount); \
ASSERT_TRUE(equals(a, c, varCountAfter)); \
deleteTerm(a); \
deleteTerm(b); \
deleteTerm(c); \
deleteTerm(d); \
}
SquareFreeTermOps::newTerm
Word * newTerm(size_t varCount)
Returns identity term of varCount variables.
Definition RawSquareFreeTerm.cpp:139
SquareFreeTermOps::newTermParse
Word * newTermParse(const char *strParam)
Allocates and returns a term based on str.
Definition RawSquareFreeTerm.cpp:25
SquareFreeTermOps::equals
bool equals(const Word *a, const Word *b, size_t varCount)
Returns true if a equals b.
Definition RawSquareFreeTerm.cpp:397
Word
unsigned long Word
The native unsigned type for the CPU.
Definition stdinc.h:93

Definition at line 540 of file RawSquareFreeTermTest.cpp.

## Function Documentation

## TEST() [1/20]

TEST | ( | RawSquareFreeTerm | ,
|  | Assign | )

Definition at line 57 of file RawSquareFreeTermTest.cpp.

## TEST() [2/20]

TEST | ( | RawSquareFreeTerm | ,
|  | Colon | )

Definition at line 286 of file RawSquareFreeTermTest.cpp.

## TEST() [3/20]

TEST | ( | RawSquareFreeTerm | ,
|  | Compact | )

Definition at line 556 of file RawSquareFreeTermTest.cpp.

## TEST() [4/20]

TEST | ( | RawSquareFreeTerm | ,
|  | Divides | )

Definition at line 323 of file RawSquareFreeTermTest.cpp.

## TEST() [5/20]

TEST | ( | RawSquareFreeTerm | ,
|  | Equals | )

Definition at line 518 of file RawSquareFreeTermTest.cpp.

## TEST() [6/20]

TEST | ( | RawSquareFreeTerm | ,
|  | Gcd | )

Definition at line 249 of file RawSquareFreeTermTest.cpp.

## TEST() [7/20]

TEST | ( | RawSquareFreeTerm | ,
|  | GetSizeOfSupport | )

Definition at line 125 of file RawSquareFreeTermTest.cpp.

## TEST() [8/20]

TEST | ( | RawSquareFreeTerm | ,
|  | GetVarIfPure | )

Definition at line 406 of file RawSquareFreeTermTest.cpp.

## TEST() [9/20]

TEST | ( | RawSquareFreeTerm | ,
|  | getWordCount | )

Definition at line 27 of file RawSquareFreeTermTest.cpp.

## TEST() [10/20]

TEST | ( | RawSquareFreeTerm | ,
|  | HasFullSupport | )

Definition at line 82 of file RawSquareFreeTermTest.cpp.

## TEST() [11/20]

TEST | ( | RawSquareFreeTerm | ,
|  | Invert | )

Definition at line 379 of file RawSquareFreeTermTest.cpp.

## TEST() [12/20]

TEST | ( | RawSquareFreeTerm | ,
|  | IsIdentity | )

Definition at line 106 of file RawSquareFreeTermTest.cpp.

## TEST() [13/20]

TEST | ( | RawSquareFreeTerm | ,
|  | IsRelativelyPrime | )

Definition at line 185 of file RawSquareFreeTermTest.cpp.

## TEST() [14/20]

TEST | ( | RawSquareFreeTerm | ,
|  | IsValid | )

Definition at line 469 of file RawSquareFreeTermTest.cpp.

## TEST() [15/20]

TEST | ( | RawSquareFreeTerm | ,
|  | Lcm | )

Definition at line 210 of file RawSquareFreeTermTest.cpp.

## TEST() [16/20]

TEST | ( | RawSquareFreeTerm | ,
|  | LexLess | )

Definition at line 345 of file RawSquareFreeTermTest.cpp.

## TEST() [17/20]

TEST | ( | RawSquareFreeTerm | ,
|  | NewTermParse | )

Definition at line 493 of file RawSquareFreeTermTest.cpp.

## TEST() [18/20]

TEST | ( | RawSquareFreeTerm | ,
|  | SetAndGetExponent | )

Definition at line 40 of file RawSquareFreeTermTest.cpp.

## TEST() [19/20]

TEST | ( | RawSquareFreeTerm | ,
|  | SetToAllVarProd | )

Definition at line 167 of file RawSquareFreeTermTest.cpp.

## TEST() [20/20]

TEST | ( | RawSquareFreeTerm | ,
|  | SetToIdentity | )

Definition at line 146 of file RawSquareFreeTermTest.cpp.