19#include "gtest/gtest.h"
33 using Value = std::variant<bool, int, std::string>;
38 const std::string_view doc);
103#if defined(MOOSE_UNIT_TEST) || defined(FOR_PYCAPABILITIES)
179#ifdef MOOSE_UNIT_TEST
197#if defined(MOOSE_UNIT_TEST) || defined(FOR_PYCAPABILITIES)
class GTEST_TEST_CLASS_NAME_(CapabilityTest, negateValue)
An entry for a single capability.
const std::string & getName() const
std::string _name
The name of capability.
std::string enumerationToString() const
std::string _doc
Description for the capability.
const std::string & getDoc() const
std::string toString() const
bool hasStringValue() const
std::optional< std::set< std::string > > _enumeration
Possible enumeration for the capability, if any (string capabilities only)
FRIEND_TEST(::CapabilitiesTest, isInstallationType)
const std::set< std::string > & getEnumeration() const
const std::optional< std::set< std::string > > & queryEnumeration() const
std::variant< bool, int, std::string > Value
A capability can have a bool, int, or string value.
void negateValue()
Negate a Capability value.
bool _explicit
Whether or not this capability must be compared explicitly (not as a boolean check)
Capability::Value _value
The value the capability is set to.
const int * queryIntValue() const
const std::string & getStringValue() const
Capability & setExplicit()
Set the capability to be explicit.
const Capability::Value & getValue() const
std::string valueToString() const
FRIEND_TEST(::CapabilityTest, negateValue)
bool hasBoolValue() const
const bool * queryBoolValue() const
Capability & setEnumeration(const std::set< std::string > &enumeration)
Set the enumeration (allowed values) for the capability.
bool hasEnumeration(const std::string &value) const
const std::string * queryStringValue() const
bool getBoolValue() const
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...