Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions
LogicalSparseUnitTests.cpp File Reference
#include "Sacado_No_Kokkos.hpp"
#include "Sacado_Random.hpp"
#include <gtest/gtest.h>
Include dependency graph for LogicalSparseUnitTests.cpp:

Go to the source code of this file.

Classes

class  LogicalSparseOpsUnitTest
 

Macros

#define BINARY_OP_TEST(TESTNAME, OP)
 
#define RELOP_TEST(TESTNAME, OP)
 
#define BINARY_FUNC_TEST(TESTNAME, FUNC)
 
#define UNARY_OP_TEST(TESTNAME, OP)
 
#define UNARY_FUNC_TEST(TESTNAME, FUNC)
 
#define UNARY_ASSIGNOP_TEST(TESTNAME, OP)
 

Typedefs

typedef Sacado::Fad::DFad< double > DFadType
 
typedef
Sacado::LFad::LogicalSparse
< double, bool > 
LSType
 

Functions

 TEST_F (LogicalSparseOpsUnitTest, testComposite1)
 
 TEST_F (LogicalSparseOpsUnitTest, testPlusLR)
 
 TEST_F (LogicalSparseOpsUnitTest, testMinusLR)
 
 TEST_F (LogicalSparseOpsUnitTest, testTimesLR)
 
 TEST_F (LogicalSparseOpsUnitTest, testDivideLR)
 
 TEST_F (LogicalSparseOpsUnitTest, testMax)
 
 TEST_F (LogicalSparseOpsUnitTest, testMin)
 

Macro Definition Documentation

#define BINARY_OP_TEST (   TESTNAME,
  OP 
)
Value:
c_dfad = a_dfad OP b_dfad; \
c_ls = a_ls OP b_ls; \
compareFads(c_dfad, c_ls); \
\
double val = urand.number(); \
c_dfad = a_dfad OP val; \
c_ls = a_ls OP val; \
compareFads(c_dfad, c_ls); \
\
c_dfad = val OP b_dfad; \
c_ls = val OP b_ls; \
compareFads(c_dfad, c_ls); \
}
#define TEST_F(test_fixture, test_name)
Definition: gtest.h:2379
expr val()

Definition at line 142 of file LogicalSparseUnitTests.cpp.

#define RELOP_TEST (   TESTNAME,
  OP 
)
Value:
bool r1 = a_dfad OP b_dfad; \
bool r2 = a_ls OP b_ls; \
ASSERT_TRUE(r1 == r2); \
\
double val = urand.number(); \
r1 = a_dfad OP val; \
r2 = a_ls OP val; \
ASSERT_TRUE(r1 == r2); \
\
r1 = val OP b_dfad; \
r2 = val OP b_ls; \
ASSERT_TRUE(r1 == r2); \
}
#define TEST_F(test_fixture, test_name)
Definition: gtest.h:2379
expr val()
#define ASSERT_TRUE(condition)
Definition: gtest.h:1985

Definition at line 158 of file LogicalSparseUnitTests.cpp.

#define BINARY_FUNC_TEST (   TESTNAME,
  FUNC 
)
Value:
c_dfad = FUNC (a_dfad,b_dfad); \
c_ls = FUNC (a_ls,b_ls); \
compareFads(c_dfad, c_ls); \
\
double val = urand.number(); \
c_dfad = FUNC (a_dfad,val); \
c_ls = FUNC (a_ls,val); \
compareFads(c_dfad, c_ls); \
\
c_dfad = FUNC (val,b_dfad); \
c_ls = FUNC (val,b_ls); \
compareFads(c_dfad, c_ls); \
}
#define TEST_F(test_fixture, test_name)
Definition: gtest.h:2379
expr val()

Definition at line 174 of file LogicalSparseUnitTests.cpp.

#define UNARY_OP_TEST (   TESTNAME,
  OP 
)
Value:
c_dfad = OP a_dfad; \
c_ls = OP a_ls; \
compareFads(c_dfad, c_ls); \
}
#define TEST_F(test_fixture, test_name)
Definition: gtest.h:2379

Definition at line 190 of file LogicalSparseUnitTests.cpp.

#define UNARY_FUNC_TEST (   TESTNAME,
  FUNC 
)
Value:
c_dfad = FUNC (a_dfad); \
c_ls = FUNC (a_ls); \
compareFads(c_dfad, c_ls); \
}
#define TEST_F(test_fixture, test_name)
Definition: gtest.h:2379

Definition at line 197 of file LogicalSparseUnitTests.cpp.

#define UNARY_ASSIGNOP_TEST (   TESTNAME,
  OP 
)
Value:
c_dfad OP a_dfad; \
c_ls OP a_ls; \
compareFads(c_dfad, c_ls); \
\
double val = urand.number(); \
c_dfad OP val; \
c_ls OP val; \
compareFads(c_dfad, c_ls); \
}
#define TEST_F(test_fixture, test_name)
Definition: gtest.h:2379
expr val()

Definition at line 204 of file LogicalSparseUnitTests.cpp.

Typedef Documentation

typedef Sacado::Fad::DFad<double> DFadType

Definition at line 34 of file LogicalSparseUnitTests.cpp.

typedef Sacado::LFad::LogicalSparse<double,bool> LSType

Definition at line 35 of file LogicalSparseUnitTests.cpp.

Function Documentation

TEST_F ( LogicalSparseOpsUnitTest  ,
testComposite1   
)

Definition at line 254 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testPlusLR   
)

Definition at line 260 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testMinusLR   
)

Definition at line 270 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testTimesLR   
)

Definition at line 280 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testDivideLR   
)

Definition at line 290 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testMax   
)

Definition at line 300 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testMin   
)

Definition at line 396 of file LogicalSparseUnitTests.cpp.