mirror of
https://github.com/johndoe6345789/MetalOS.git
synced 2026-04-24 13:45:02 +00:00
Address code review feedback: fix assertion order and workflow issues
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
1
.github/workflows/qemu-test.yml
vendored
1
.github/workflows/qemu-test.yml
vendored
@@ -25,7 +25,6 @@ jobs:
|
||||
ovmf \
|
||||
mtools \
|
||||
xorriso \
|
||||
scrot \
|
||||
imagemagick
|
||||
|
||||
- name: Build bootloader
|
||||
|
||||
8
.github/workflows/unit-tests.yml
vendored
8
.github/workflows/unit-tests.yml
vendored
@@ -33,10 +33,4 @@ jobs:
|
||||
- name: Test summary
|
||||
if: always()
|
||||
run: |
|
||||
echo "Unit tests completed"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✓ All tests passed"
|
||||
else
|
||||
echo "✗ Some tests failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "Unit test execution completed"
|
||||
|
||||
@@ -50,7 +50,7 @@ static TestStats test_stats = {0, 0, 0};
|
||||
do { \
|
||||
if ((a) != (b)) { \
|
||||
printf(COLOR_RED "[FAILED] " COLOR_RESET "%s:%d: Expected %lld, got %lld\n", \
|
||||
__FILE__, __LINE__, (long long)(a), (long long)(b)); \
|
||||
__FILE__, __LINE__, (long long)(b), (long long)(a)); \
|
||||
test_stats.failed++; \
|
||||
return; \
|
||||
} \
|
||||
@@ -59,8 +59,8 @@ static TestStats test_stats = {0, 0, 0};
|
||||
#define ASSERT_NE(a, b) \
|
||||
do { \
|
||||
if ((a) == (b)) { \
|
||||
printf(COLOR_RED "[FAILED] " COLOR_RESET "%s:%d: Expected not equal: %lld == %lld\n", \
|
||||
__FILE__, __LINE__, (long long)(a), (long long)(b)); \
|
||||
printf(COLOR_RED "[FAILED] " COLOR_RESET "%s:%d: Values should not be equal: %lld\n", \
|
||||
__FILE__, __LINE__, (long long)(a)); \
|
||||
test_stats.failed++; \
|
||||
return; \
|
||||
} \
|
||||
|
||||
@@ -19,8 +19,8 @@ typedef struct {
|
||||
uint32_t bg_color;
|
||||
} Console;
|
||||
|
||||
// Mock framebuffer for testing
|
||||
static uint32_t test_framebuffer[1920 * 1080];
|
||||
// Mock framebuffer for testing (using smaller size to avoid stack issues)
|
||||
static uint32_t test_framebuffer[800 * 600];
|
||||
|
||||
// Simplified console functions for unit testing
|
||||
// In real implementation, these would be in a testable module
|
||||
|
||||
Reference in New Issue
Block a user