mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
Improved testing
* Refactored workflows to use a single workflow for both VM and non-VM builds * Compiler tests are now able to test compilation of different architectures
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <asmjit/core.h>
|
||||
|
||||
ASMJIT_MAYBE_UNUSED
|
||||
static const char* asmjitArchAsString(asmjit::Arch arch) noexcept {
|
||||
switch (arch) {
|
||||
case asmjit::Arch::kX86 : return "X86";
|
||||
@@ -35,4 +36,21 @@ static const char* asmjitArchAsString(asmjit::Arch arch) noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
ASMJIT_MAYBE_UNUSED
|
||||
static void printIndented(const char* str, size_t indent) noexcept {
|
||||
const char* start = str;
|
||||
while (*str) {
|
||||
if (*str == '\n') {
|
||||
size_t size = (size_t)(str - start);
|
||||
printf("%*s%.*s\n", size ? int(indent) : 0, "", int(size), start);
|
||||
start = str + 1;
|
||||
}
|
||||
str++;
|
||||
}
|
||||
|
||||
size_t size = (size_t)(str - start);
|
||||
if (size)
|
||||
printf("%*s%.*s\n", int(indent), "", int(size), start);
|
||||
}
|
||||
|
||||
#endif // ASMJITUTILS_H_INCLUDED
|
||||
|
||||
Reference in New Issue
Block a user