MCPcopy Create free account
hub / github.com/CLIUtils/CLI11 / compare

Method compare

fuzz/fuzzApp.cpp:183–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182static constexpr double keydub = 6262542.2622;
183bool FuzzApp::compare(const FuzzApp &other, bool print_error) const {
184 if(val32 != other.val32) {
185 return false;
186 }
187 if(val16 != other.val16) {
188 return false;
189 }
190 if(val8 != other.val8) {
191 return false;
192 }
193 if(val64 != other.val64) {
194 return false;
195 }
196
197 if(uval32 != other.uval32) {
198 return false;
199 }
200 if(uval16 != other.uval16) {
201 return false;
202 }
203 if(uval8 != other.uval8) {
204 return false;
205 }
206 if(uval64 != other.uval64) {
207 return false;
208 }
209
210 if(atomicval64 != other.atomicval64) {
211 return false;
212 }
213 if(atomicuval64 != other.atomicuval64) {
214 return false;
215 }
216
217 if(v1 != other.v1) {
218 if(!(std::isnan(v1) && std::isnan(other.v1))) {
219 return false;
220 }
221 }
222 if(v2 != other.v2) {
223 if(!(std::isnan(v2) && std::isnan(other.v2))) {
224 return false;
225 }
226 }
227
228 if(vv1 != other.vv1) {
229 if(vv1.size() != other.vv1.size()) {
230 return false;
231 }
232 // need to check if they are both nan
233 for(std::size_t index = 0; index < vv1.size(); ++index) {
234 if(vv1[index] != other.vv1[index]) {
235 if(std::isnan(vv1[index]) && std::isnan(other.vv1[index])) {
236 continue;
237 }
238 return false;
239 }
240 }

Callers 11

FuzzFailTest.cppFile · 0.80
integral_conversionFunction · 0.80
is_binary_escaped_stringFunction · 0.80
from_configMethod · 0.80
check_name_detailMethod · 0.80
split_longFunction · 0.80
LLVMFuzzerTestOneInputFunction · 0.80
extract_subcomand_infoFunction · 0.80
add_custom_optionsMethod · 0.80

Calls 5

print_string_comparisonFunction · 0.85
to_stringFunction · 0.85
realMethod · 0.80
imagMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected