added a "manual" test, so the code can be profiled / leak checked in
valgrind
This commit is contained in:
		
							
								
								
									
										22
									
								
								manualtest.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								manualtest.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					#include<iostream>
 | 
				
			||||||
 | 
					#include<sstream>
 | 
				
			||||||
 | 
					#include"String.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    String str1;
 | 
				
			||||||
 | 
					    std::stringstream stream;
 | 
				
			||||||
 | 
					    stream << "sajt";
 | 
				
			||||||
 | 
					    stream >> str1;
 | 
				
			||||||
 | 
					    std::cout << str1 << std::endl;
 | 
				
			||||||
 | 
					    String str2(" cicasajt");
 | 
				
			||||||
 | 
					    String str3(str2);
 | 
				
			||||||
 | 
					    str2 = str1;
 | 
				
			||||||
 | 
					    String str4(String("sajtos cica"));
 | 
				
			||||||
 | 
					    str2 = String(" tihihi");
 | 
				
			||||||
 | 
					    std::cout << str4 + str3 << std::endl;
 | 
				
			||||||
 | 
					    std::cout << ((str4 + str3)+=str2) << std::endl;
 | 
				
			||||||
 | 
					    std::cout << str4[0] << static_cast<const String>(str2)[1] << std::endl;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user