Ajout de tests (++, --)
This commit is contained in:
parent
0eb84afebf
commit
7a35d457d9
@ -25,5 +25,20 @@ int main() {
|
|||||||
"Déclaration puis assignement"
|
"Déclaration puis assignement"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_TEST_ASSERT(
|
||||||
|
_TEST_NO_EXCEPTION(execute("int a = 27; ++a;") == 28),
|
||||||
|
"Incrémentation par la gauche"
|
||||||
|
);
|
||||||
|
|
||||||
|
_TEST_ASSERT(
|
||||||
|
_TEST_NO_EXCEPTION(execute("int a = 27; a--;") == 27),
|
||||||
|
"Décrémentation par la droite"
|
||||||
|
);
|
||||||
|
|
||||||
|
_TEST_ASSERT(
|
||||||
|
_TEST_NO_EXCEPTION(execute("int a = 27; -(+-++a);") == 28),
|
||||||
|
"Incrémentation et opérations unaires"
|
||||||
|
);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user