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 122 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 138 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 154 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 170 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 177 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 184 of file LogicalSparseUnitTests.cpp.

Typedef Documentation

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

Definition at line 14 of file LogicalSparseUnitTests.cpp.

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

Definition at line 15 of file LogicalSparseUnitTests.cpp.

Function Documentation

TEST_F ( LogicalSparseOpsUnitTest  ,
testComposite1   
)

Definition at line 234 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testPlusLR   
)

Definition at line 240 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testMinusLR   
)

Definition at line 250 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testTimesLR   
)

Definition at line 260 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testDivideLR   
)

Definition at line 270 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testMax   
)

Definition at line 280 of file LogicalSparseUnitTests.cpp.

TEST_F ( LogicalSparseOpsUnitTest  ,
testMin   
)

Definition at line 376 of file LogicalSparseUnitTests.cpp.