mirror of
				https://github.com/eledio-devices/thirdparty-tinyexpr.git
				synced 2025-10-31 16:14:16 +01:00 
			
		
		
		
	Added a couple extra tests.
This commit is contained in:
		
							
								
								
									
										4
									
								
								test.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								test.c
									
									
									
									
									
								
							| @@ -535,6 +535,8 @@ void test_pow() { | |||||||
|     test_equ cases[] = { |     test_equ cases[] = { | ||||||
|         {"2^3^4", "2^(3^4)"}, |         {"2^3^4", "2^(3^4)"}, | ||||||
|         {"-2^2", "-(2^2)"}, |         {"-2^2", "-(2^2)"}, | ||||||
|  |         {"--2^2", "(2^2)"}, | ||||||
|  |         {"---2^2", "-(2^2)"}, | ||||||
|         {"-(2)^2", "-(2^2)"}, |         {"-(2)^2", "-(2^2)"}, | ||||||
|         {"-(2*1)^2", "-(2^2)"}, |         {"-(2*1)^2", "-(2^2)"}, | ||||||
|         {"-2^2", "-4"}, |         {"-2^2", "-4"}, | ||||||
| @@ -546,6 +548,8 @@ void test_pow() { | |||||||
|     test_equ cases[] = { |     test_equ cases[] = { | ||||||
|         {"2^3^4", "(2^3)^4"}, |         {"2^3^4", "(2^3)^4"}, | ||||||
|         {"-2^2", "(-2)^2"}, |         {"-2^2", "(-2)^2"}, | ||||||
|  |         {"--2^2", "2^2"}, | ||||||
|  |         {"---2^2", "(-2)^2"}, | ||||||
|         {"-2^2", "4"}, |         {"-2^2", "4"}, | ||||||
|         {"2^1.1^1.2^1.3", "((2^1.1)^1.2)^1.3"}, |         {"2^1.1^1.2^1.3", "((2^1.1)^1.2)^1.3"}, | ||||||
|         {"-a^b", "(-a)^b"}, |         {"-a^b", "(-a)^b"}, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user