IntIsOne
Description
Test whether the integer equals one.
Parameters
| Name | Direction | Description |
|---|---|---|
value |
in | Integer to inspect. |
Success
Returns true when the integer equals one.
Failure
Returns false otherwise.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Int.c:442:
}
bool IntIsOne(const Int *value) {
return int_is_one(value);
}- In
Compare.c:238:
// Real code returns true; the mutant returns false -> distinguishable.
bool test_m27_is_one_of_one(void) {
WriteFmt("Testing IntIsOne(1) returns true\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Compare.c:244:
Int one = IntFrom(1, &alloc.base);
bool result = (IntIsOne(&one) == true);
IntDeinit(&one);- In
Access.c:73:
bool test_int_is_one(void) {
WriteFmt("Testing IntIsOne\n");
DefaultAllocator alloc = DefaultAllocatorInit();- In
Access.c:80:
Int two = IntFrom(2, &alloc.base);
bool result = IntIsOne(&one);
result = result && !IntIsOne(&two);- In
Access.c:81:
bool result = IntIsOne(&one);
result = result && !IntIsOne(&two);
IntDeinit(&one);
Last updated on