mirror of
				https://github.com/Z3Prover/z3
				synced 2025-10-31 19:52:29 +00:00 
			
		
		
		
	Add a test that specifically test the expansion of the memory in string_buffer.
This commit is contained in:
		
							parent
							
								
									c56a7dff1f
								
							
						
					
					
						commit
						d831ce1161
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		|  | @ -45,8 +45,18 @@ static void tst3() { | ||||||
|   ENSURE(strcmp(b.c_str(), "Hello World") == 0); |   ENSURE(strcmp(b.c_str(), "Hello World") == 0); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | static void tst_small_buffer_expand(){ | ||||||
|  |   string_buffer<4> b; | ||||||
|  |   b << "Hello"; | ||||||
|  |   ENSURE(strcmp(b.c_str(), "Hello") == 0); | ||||||
|  | 
 | ||||||
|  |   b << " World"; | ||||||
|  |   ENSURE(strcmp(b.c_str(), "Hello World") == 0); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void tst_string_buffer() { | void tst_string_buffer() { | ||||||
|   tst1(); |   tst1(); | ||||||
|   tst2(); |   tst2(); | ||||||
|   tst3(); |   tst3(); | ||||||
|  |   tst_small_buffer_expand(); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue