Skip to content

Commit

Permalink
to squash: misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VivianNK committed Aug 22, 2024
1 parent 8e7f35e commit 250df12
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ using namespace testing;
**/
class AdvancedLoggerWriteTest : public Test {
protected:
MockUefiBootServicesTableLib gBSMock;
MockAdvancedLogger AdvLoggerProtocolMock;
StrictMock<MockUefiBootServicesTableLib> gBSMock;
StrictMock<MockAdvancedLogger> AdvLoggerProtocolMock;
UINTN DebugLevel;
CHAR8 *Buffer;
UINTN NumberOfBytes;
Expand All @@ -52,7 +52,6 @@ class AdvancedLoggerWriteTest : public Test {
mInitialized = FALSE;
gALProtocol->Signature = ADVANCED_LOGGER_PROTOCOL_SIGNATURE;
gALProtocol->Version = ADVANCED_LOGGER_PROTOCOL_VERSION;
mInitialized = FALSE;
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
##

[Defines]
INF_VERSION = 1.26
BASE_NAME = AdvancedLoggerDxeLibGoogleTest
FILE_GUID = E6C75458-9408-42F5-BF84-CAF9C6D0751B
MODULE_TYPE = HOST_APPLICATION
VERSION_STRING = 1.0
INF_VERSION = 1.26
BASE_NAME = AdvancedLoggerDxeLibGoogleTest
FILE_GUID = E6C75458-9408-42F5-BF84-CAF9C6D0751B
MODULE_TYPE = HOST_APPLICATION
VERSION_STRING = 1.0

#
# The following information is for reference only and not required by the build tools.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/** @file MockAdvancedLogger.h
/** @file MockAdvancedLogger.h
This file declares a mock of the Advanced Logger Protocol.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#ifndef MOCK_ADVANCED_LOGGER_LIB_H_
#define MOCK_ADVANCED_LOGGER_LIB_H_
#ifndef MOCK_ADVANCED_LOGGER_PROTOCOL_H_
#define MOCK_ADVANCED_LOGGER_PROTOCOL_H_

#include <Library/GoogleTestLib.h>
#include <Library/FunctionMockLib.h>
Expand All @@ -29,10 +29,6 @@ struct MockAdvancedLogger {
);
};

extern "C" {
extern ADVANCED_LOGGER_PROTOCOL *gALProtocol;
}

//
// Mock function definitions in header file to prevent need of cpp file and
// make it easier to consume in tests.
Expand All @@ -52,4 +48,4 @@ extern "C" {
ADVANCED_LOGGER_PROTOCOL *gALProtocol = &advancedLoggerInstance;
}

#endif // MOCK_ADVANCED_LOGGER_LIB_H_
#endif // MOCK_ADVANCED_LOGGER_PROTOCOL_H_

0 comments on commit 250df12

Please sign in to comment.