// File: porzell[P]PTest/examples/../include/ptest.hpp
// Function: PTest::PTestRegistry::RunAllTests()
int RunAllTests() {
			size_t testsRunCount = 0;
			size_t testsFailedCount = 0;

			SetConsoleColor(PColor::Green);
			printf("\n[Running all tests]\n\n");
			SetConsoleColor(PColor::Normal);

			std::chrono::duration<double, std::milli> totalDuration = std::chrono::milliseconds(0);

			for (auto& it : index_) {
				auto& theTest = it->second;
				currentTest_ = &theTest;
				if (!theTest.Run()) {
					testsFailedCount++;
				}
				currentTest_ = nullptr;
				totalDuration += theTest.GetDuration();
				testsRunCount++;
			}

			putchar('\n');
			SetConsoleColor(PColor::Normal); PrintBars(3); printf("[Test Summary]:");
			SetConsoleColor(PColor::Blue); printf("\t\t\t(Total Time: %f ms)\n", totalDuration.count());
			SetConsoleColor(PColor::Green); printf("\tTests Passed:\t");
			SetConsoleColor(PColor::Normal); printf("%zu\n", testsRunCount - testsFailedCount);
			testsFailedCount ? SetConsoleColor(PColor::Red) : SetConsoleColor(PColor::Green);
			printf("\tTests Failed:\t");
			SetConsoleColor(PColor::Normal); printf("%zu\n", testsFailedCount);
			SetConsoleColor(PColor::Blue); printf("\tTotal Tests:\t");
			SetConsoleColor(PColor::Normal); printf("%zu\n", testsRunCount); PrintBars(3);

			return testsFailedCount;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x1, %edi
callq 0x24b0
leaq 0x61ab(%rip), %rdi      # 0x9260
movb $0x0, %al
callq 0x2040
xorl %edi, %edi
callq 0x24b0
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x20e0
movq -0x58(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x43b0
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4240
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x8290
testb $0x1, %al
jne 0x310f
jmp 0x3196
leaq -0x30(%rbp), %rdi
callq 0x82d0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x82f0
movq %rax, %rcx
movq -0x58(%rbp), %rax
addq $0x20, %rcx
movq %rcx, -0x48(%rbp)
movq -0x48(%rbp), %rcx
movq %rcx, 0x50(%rax)
movq -0x48(%rbp), %rdi
callq 0x8640
testb $0x1, %al
jne 0x3155
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x58(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x48(%rbp), %rdi
callq 0x8890
movsd %xmm0, -0x50(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x88b0
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x8340
jmp 0x30f9
movl $0xa, %edi
callq 0x21e0
xorl %edi, %edi
callq 0x24b0
movl $0x3, %edi
callq 0x2460
leaq 0x60bf(%rip), %rdi      # 0x9277
movb $0x0, %al
callq 0x2040
movl $0x2, %edi
callq 0x24b0
leaq -0x20(%rbp), %rdi
callq 0x88f0
leaq 0x60ae(%rip), %rdi      # 0x9287
movb $0x1, %al
callq 0x2040
movl $0x1, %edi
callq 0x24b0
leaq 0x60ae(%rip), %rdi      # 0x929f
movb $0x0, %al
callq 0x2040
xorl %edi, %edi
callq 0x24b0
movq -0x10(%rbp), %rsi
subq -0x18(%rbp), %rsi
leaq 0x60a1(%rip), %rdi      # 0x92af
movb $0x0, %al
callq 0x2040
cmpq $0x0, -0x18(%rbp)
je 0x3228
movl $0x3, %edi
callq 0x24b0
jmp 0x3232
movl $0x1, %edi
callq 0x24b0
leaq 0x607b(%rip), %rdi      # 0x92b4
movb $0x0, %al
callq 0x2040
xorl %edi, %edi
callq 0x24b0
movq -0x18(%rbp), %rsi
leaq 0x605d(%rip), %rdi      # 0x92af
movb $0x0, %al
callq 0x2040
movl $0x2, %edi
callq 0x24b0
leaq 0x605a(%rip), %rdi      # 0x92c4
movb $0x0, %al
callq 0x2040
xorl %edi, %edi
callq 0x24b0
movq -0x10(%rbp), %rsi
leaq 0x602c(%rip), %rdi      # 0x92af
movb $0x0, %al
callq 0x2040
movl $0x3, %edi
callq 0x2460
movq -0x18(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nop