mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:22:43 +00:00 
			
		
		
		
	 6e19ab2bbc
			
		
	
	
		6e19ab2bbc
		
	
	
	
	
		
			
			We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
		
			
				
	
	
		
			50 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
 | |
|  * Copyright (c) 2020-2021, Linus Groh <linusg@serenityos.org>
 | |
|  * Copyright (c) 2021, Brian Gianforcaro <bgianf@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/DeprecatedString.h>
 | |
| #include <AK/Vector.h>
 | |
| 
 | |
| namespace Test {
 | |
| 
 | |
| enum class Result {
 | |
|     Pass,
 | |
|     Fail,
 | |
|     Skip,
 | |
|     Crashed,
 | |
| };
 | |
| 
 | |
| struct Case {
 | |
|     DeprecatedString name;
 | |
|     Result result;
 | |
|     DeprecatedString details;
 | |
|     u64 duration_us;
 | |
| };
 | |
| 
 | |
| struct Suite {
 | |
|     DeprecatedString path;
 | |
|     DeprecatedString name;
 | |
|     // A failed test takes precedence over a skipped test, which both have
 | |
|     // precedence over a passed test
 | |
|     Result most_severe_test_result { Result::Pass };
 | |
|     Vector<Case> tests {};
 | |
| };
 | |
| 
 | |
| struct Counts {
 | |
|     // Not all of these might be used by a certain test runner, e.g. some
 | |
|     // do not have a concept of suites, or might not load tests from files.
 | |
|     unsigned tests_failed { 0 };
 | |
|     unsigned tests_passed { 0 };
 | |
|     unsigned tests_skipped { 0 };
 | |
|     unsigned suites_failed { 0 };
 | |
|     unsigned suites_passed { 0 };
 | |
|     unsigned files_total { 0 };
 | |
| };
 | |
| 
 | |
| }
 |