Added a couple extra tests.

This commit is contained in:
Lewis Van Winkle
2016-08-23 18:35:50 -05:00
parent a724fbd695
commit f0b59d6d48

4
test.c
View File

@@ -535,6 +535,8 @@ void test_pow() {
test_equ cases[] = {
{"2^3^4", "2^(3^4)"},
{"-2^2", "-(2^2)"},
{"--2^2", "(2^2)"},
{"---2^2", "-(2^2)"},
{"-(2)^2", "-(2^2)"},
{"-(2*1)^2", "-(2^2)"},
{"-2^2", "-4"},
@@ -546,6 +548,8 @@ void test_pow() {
test_equ cases[] = {
{"2^3^4", "(2^3)^4"},
{"-2^2", "(-2)^2"},
{"--2^2", "2^2"},
{"---2^2", "(-2)^2"},
{"-2^2", "4"},
{"2^1.1^1.2^1.3", "((2^1.1)^1.2)^1.3"},
{"-a^b", "(-a)^b"},