Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
Loading...
Searching...
No Matches
Classes | Functions | Variables
tabulated_dynamicalDE_EoS_tests.cpp File Reference
#include <sstream>
#include <string>
#include <gtest/gtest.h>
#include "tabulated_dynamicalDE_EoS.h"
Include dependency graph for tabulated_dynamicalDE_EoS_tests.cpp:

Classes

struct  FileVariation
 
class  tALLTabulatedDynamicalDarkEnergyEoS
 
class  tALLTabulatedDynamicalDarkEnergyEoSNoContentsDeathTest
 

Functions

const char * string_file_path_ ("dummy-file-path")
 
TabulatedDynamicalDarkEnergyEoS construct_from_string_ (const std::string &contents)
 
void PrintTo (const FileVariation &fv, std::ostream *os)
 
 TEST_P (tALLTabulatedDynamicalDarkEnergyEoS, SimpleOpen)
 
 INSTANTIATE_TEST_SUITE_P (, tALLTabulatedDynamicalDarkEnergyEoS, testing::ValuesIn(valid_variants_), testing::PrintToStringParamName())
 
 TEST (tALLTabulatedDynamicalDarkEnergyEoSDeathTest, InvalidPath)
 
 TEST (tALLTabulatedDynamicalDarkEnergyEoSDeathTest, MissingRedshift0)
 
 TEST (tALLTabulatedDynamicalDarkEnergyEoSDeathTest, OutOfOrder)
 
 TEST (tALLTabulatedDynamicalDarkEnergyEoSDeathTest, SingleElemOnLine2)
 
 TEST (tALLTabulatedDynamicalDarkEnergyEoSDeathTest, ThreeElemsOnLine2)
 
 TEST_P (tALLTabulatedDynamicalDarkEnergyEoSNoContentsDeathTest, Simple)
 
 INSTANTIATE_TEST_SUITE_P (, tALLTabulatedDynamicalDarkEnergyEoSNoContentsDeathTest, testing::ValuesIn(invalid_variants_), testing::PrintToStringParamName())
 

Variables

const std::string GOOD_CONTENTS_
 
const FileVariation valid_variants_ [3]
 
const FileVariation invalid_variants_ []
 

Detailed Description

Holds tests for TabulatedDynamicalDarkEnergyEoS

Function Documentation

◆ construct_from_string_()

TabulatedDynamicalDarkEnergyEoS construct_from_string_ ( const std::string &  contents)

A helper function that constructs a TabulatedDynamicalDarkEnergyEoS instance by treating contents as the contents of a file

Variable Documentation

◆ GOOD_CONTENTS_

const std::string GOOD_CONTENTS_
Initial value:
= R"LITERAL(# z, w
0.000000000000000000e+00 -9.767616499273475972e-01
6.938631476027579126e-03 -9.769941793369097960e-01
# this is a random meaningless comment!
1.392540755881421788e-02 -9.772263520514015145e-01)LITERAL"

◆ invalid_variants_

const FileVariation invalid_variants_[]
Initial value:
= {
{"Empty", ""},
{"SingleBlankLine", "\n"},
{"SingleComment", "# this is a comment!"},
}

◆ valid_variants_

const FileVariation valid_variants_[3]
Initial value:
= {
{"NoTerminalNewline", GOOD_CONTENTS_},
{"WithTerminalNewline", GOOD_CONTENTS_ + '\n'},
{"EmptyFinalLine", GOOD_CONTENTS_ + "\n\n"},
}