mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-01 13:51:43 +00:00
08194af424
- Moved C++ code to cpp/ from src/raspberrypi - Related updates to Makefile, easyinstall.sh, and the github build rules - Removed the native X68k C code in src/x68k from the repo
34 lines
1010 B
C++
34 lines
1010 B
C++
//---------------------------------------------------------------------------
|
|
//
|
|
// SCSI Target Emulator RaSCSI Reloaded
|
|
// for Raspberry Pi
|
|
//
|
|
// Copyright (C) 2022 Uwe Seimet
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include "rascsi/localizer.h"
|
|
|
|
TEST(Localizer, Localize)
|
|
{
|
|
Localizer localizer;
|
|
|
|
string message = localizer.Localize(LocalizationKey::ERROR_AUTHENTICATION, "");
|
|
EXPECT_FALSE(message.empty());
|
|
EXPECT_EQ(string::npos, message.find("enum value"));
|
|
|
|
message = localizer.Localize(LocalizationKey::ERROR_AUTHENTICATION, "de_DE");
|
|
EXPECT_FALSE(message.empty());
|
|
EXPECT_EQ(string::npos, message.find("enum value"));
|
|
|
|
message = localizer.Localize(LocalizationKey::ERROR_AUTHENTICATION, "en");
|
|
EXPECT_FALSE(message.empty());
|
|
EXPECT_EQ(string::npos, message.find("enum value"));
|
|
|
|
message = localizer.Localize((LocalizationKey)1234, "");
|
|
EXPECT_FALSE(message.empty());
|
|
EXPECT_NE(string::npos, message.find("enum value"));
|
|
}
|