diff --git a/test/variables.cpp b/test/variables.cpp index cbf7be2..6ca7ceb 100644 --- a/test/variables.cpp +++ b/test/variables.cpp @@ -25,5 +25,20 @@ int main() { "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; } \ No newline at end of file