Skip to content

Commit 9edaff9

Browse files
committed
Fix: Unittest build fix after f86d2ed
1 parent f225fbe commit 9edaff9

File tree

7 files changed

+9
-11
lines changed

7 files changed

+9
-11
lines changed

include/bitmap.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/*
22
* ---------------------------------------------------------------------------
3-
* Megha Operating System V2 - Common - Bitmap
3+
* Megha Operating System V2 - Cross Platform Kernel - Bitmap
44
*
55
* Bitmap implementation for use in the OS.
66
* ---------------------------------------------------------------------------
77
*/
88

9-
#ifndef COMMON_BITMAP_H
10-
#define COMMON_BITMAP_H
9+
#pragma once
1110

1211
#include <types.h>
1312
#include <utils.h>
@@ -34,4 +33,3 @@ BitmapState bitmap_get (Bitmap *b, UINT index);
3433
bool bitmap_setContinous (Bitmap *b, UINT index, UINT len, BitmapState state);
3534
INT bitmap_findContinous (Bitmap *b, BitmapState state, UINT len);
3635
bool bitmap_findContinousAt (Bitmap *b, BitmapState state, UINT len, UINT indexAt);
37-
#endif // COMMON_BITMAP_H

include/mock/common/bitmap.h renamed to include/mock/kernel/bitmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define BITMAP_FAKE_H
33

44
#include <unittest/fake.h>
5-
#include <common/bitmap.h>
5+
#include <bitmap.h>
66

77
DECLARE_FUNC(BitmapState, bitmap_get, Bitmap *, UINT);
88
DECLARE_FUNC(bool, bitmap_setContinous, Bitmap *, UINT, UINT, BitmapState);

include/mock/kernel/x86/pmm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef PMM_FAKE_X86_H
22
#define PMM_FAKE_X86_H
33

4-
#include <common/bitmap.h>
4+
#include <bitmap.h>
55
#include <unittest/fake.h>
66
#include <types.h>
77

src/mock/common/bitmap.c renamed to src/mock/kernel/bitmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <mock/common/bitmap.h>
1+
#include <mock/kernel/bitmap.h>
22
#include <unittest/fake.h>
33

44
DEFINE_FUNC(BitmapState, bitmap_get, Bitmap*, UINT);

src/unittests/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test(
3535
NAME bitmap_test
3636
DEPENDENT_FOR build-all
3737
SOURCES
38-
${PROJECT_SOURCE_DIR}/src/common/bitmap.c
38+
${PROJECT_SOURCE_DIR}/src/kernel/bitmap.c
3939
${CMAKE_CURRENT_SOURCE_DIR}/bitmap_test.c
4040
${CMAKE_CURRENT_SOURCE_DIR}/unittest.c
4141
${CMAKE_CURRENT_SOURCE_DIR}/common.c
@@ -78,7 +78,7 @@ test(
7878
DEPENDENT_FOR build-all
7979
SOURCES
8080
${PROJECT_SOURCE_DIR}/src/kernel/pmm.c
81-
${PROJECT_SOURCE_DIR}/src/common/bitmap.c
81+
${PROJECT_SOURCE_DIR}/src/kernel/bitmap.c
8282
${CMAKE_CURRENT_SOURCE_DIR}/pmm_test.c
8383
${CMAKE_CURRENT_SOURCE_DIR}/common.c
8484
${CMAKE_CURRENT_SOURCE_DIR}/unittest.c

src/unittests/bitmap_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <common/bitmap.h>
1+
#include <bitmap.h>
22
#include <stdio.h>
33
#include <string.h>
44
#include <types.h>

src/unittests/x86/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test(
99
${CMAKE_CURRENT_SOURCE_DIR}/../common.c
1010
# Mock sources
1111
${PROJECT_SOURCE_DIR}/src/mock/kernel/kstdlib.c
12-
${PROJECT_SOURCE_DIR}/src/mock/common/bitmap.c
12+
${PROJECT_SOURCE_DIR}/src/mock/kernel/bitmap.c
1313
${PROJECT_SOURCE_DIR}/src/mock/kernel/pmm.c
1414
${PROJECT_SOURCE_DIR}/src/mock/kernel/x86/boot.c
1515
)

0 commit comments

Comments
 (0)