MCPcopy Create free account
hub / github.com/argotorg/solidity / validate

Method validate

test/Common.cpp:130–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void CommonOptions::validate() const
131{
132 solRequire(
133 !testPath.empty(),
134 ConfigException,
135 "No test path specified. The --testpath argument must not be empty when given."
136 );
137 solRequire(
138 fs::exists(testPath),
139 ConfigException,
140 "Invalid test path specified."
141 );
142 solRequire(
143 batches > 0,
144 ConfigException,
145 "Batches needs to be at least 1."
146 );
147 solRequire(
148 selectedBatch < batches,
149 ConfigException,
150 "Selected batch has to be less than number of batches."
151 );
152
153 if (!enforceGasTest)
154 std::cout << std::endl << "WARNING :: Gas cost expectations are not being enforced" << std::endl << std::endl;
155 else if (evmVersion() != langutil::EVMVersion{} || useABIEncoderV1)
156 {
157 std::cout << std::endl << "WARNING :: Enforcing gas cost expectations with non-standard settings:" << std::endl;
158 if (evmVersion() != langutil::EVMVersion{})
159 std::cout << "- EVM version: " << evmVersion().name() << " (default: " << langutil::EVMVersion{}.name() << ")" << std::endl;
160 if (useABIEncoderV1)
161 std::cout << "- ABI coder: v1 (default: v2)" << std::endl;
162 std::cout << std::endl << "DO NOT COMMIT THE UPDATED EXPECTATIONS." << std::endl << std::endl;
163 }
164
165 solRequire(
166 !eofVersion().has_value() || evmVersion().supportsEOF(),
167 ConfigException,
168 "EOF is not supported by EVM versions earlier than " + langutil::EVMVersion::firstWithEOF().name() + "."
169 );
170}
171
172bool CommonOptions::parse(int argc, char const* const* argv)
173{

Callers 1

initializeOptionsFunction · 0.45

Calls 3

supportsEOFMethod · 0.80
emptyMethod · 0.45
nameMethod · 0.45

Tested by 1

initializeOptionsFunction · 0.36