From 0d6513e24656c42efa1fa3d12993896b80258e76 Mon Sep 17 00:00:00 2001 From: Sergey Isakov Date: Fri, 24 Apr 2020 19:24:34 +0300 Subject: [PATCH 1/2] use os_unknown, some tests Signed-off-by: Sergey Isakov --- rEFIt_UEFI/libeg/XTheme.cpp | 4 ++-- rEFIt_UEFI/refit/main.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/rEFIt_UEFI/libeg/XTheme.cpp b/rEFIt_UEFI/libeg/XTheme.cpp index 8980cfdbc..f80958338 100644 --- a/rEFIt_UEFI/libeg/XTheme.cpp +++ b/rEFIt_UEFI/libeg/XTheme.cpp @@ -78,9 +78,9 @@ CONST CHAR8* IconsNames[] = { "checkbox_checked", "scrollbar_background", //24 - present here for SVG theme but should be done more common way "scrollbar_holder", - //other oses will be added below //example - "os_uuu", //51 == ICON_OTHER_OS + "os_unknown", //51 == ICON_OTHER_OS + //other oses will be added below "" }; const INTN IconsNamesSize = sizeof(IconsNames) / sizeof(IconsNames[0]); diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index 06f3c16f9..19844609c 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -35,6 +35,7 @@ */ #include "../Platform/Platform.h" +#include "../cpp_foundation/XString.h" #include "../cpp_util/globals_ctor.h" #include "../cpp_util/globals_dtor.h" #include "../cpp_unit_test/all_tests.h" @@ -2136,7 +2137,12 @@ RefitMain (IN EFI_HANDLE ImageHandle, const CHAR16 *aaa = L"12345 "; const CHAR8 *bbb = "12345 "; DBG(" string %ls, size=%lld, len=%lld sizeof=%ld iStrLen=%lld\n", aaa, StrSize(aaa), StrLen(aaa), sizeof(aaa), iStrLen(bbb, 10)); - + const CHAR8* ссс = "Выход "; + DBG(" string %ls, size=%lld, len=%lld sizeof=%ld iStrLen=%lld\n", ссс, AsciiStrSize(ссс), AsciiStrLen(ссс), sizeof(ссс), iStrLen(ссс, 10)); + XString ddd = "Выход "_XS; + // size_t sizex = ddd.allocatedSize(); + DBG(" xstring %s, asize=%lld, sizeinbyte=%lld sizeof=%ld lastcharat=%lld\n", ddd.c_str(), ddd.allocatedSize(), ddd.sizeInBytes(), sizeof(ddd), + ddd.indexOf(ddd.LastChar())); CHAR8 compatible[64]; UINT32 FakeLAN = 0x0030168c; UINT32 FakeID = FakeLAN >> 16; From ddd42ed08b1048135d0144dcf5ec10cd116c38b6 Mon Sep 17 00:00:00 2001 From: SergeySlice Date: Sat, 25 Apr 2020 06:37:56 +0300 Subject: [PATCH 2/2] correct broken test Signed-off-by: SergeySlice --- rEFIt_UEFI/refit/main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index 19844609c..9b6015fac 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -2137,11 +2137,11 @@ RefitMain (IN EFI_HANDLE ImageHandle, const CHAR16 *aaa = L"12345 "; const CHAR8 *bbb = "12345 "; DBG(" string %ls, size=%lld, len=%lld sizeof=%ld iStrLen=%lld\n", aaa, StrSize(aaa), StrLen(aaa), sizeof(aaa), iStrLen(bbb, 10)); - const CHAR8* ссс = "Выход "; - DBG(" string %ls, size=%lld, len=%lld sizeof=%ld iStrLen=%lld\n", ссс, AsciiStrSize(ссс), AsciiStrLen(ссс), sizeof(ссс), iStrLen(ссс, 10)); - XString ddd = "Выход "_XS; + const CHAR8* ccc = "Выход "; + DBG(" string %s, size=%lld, len=%lld sizeof=%ld iStrLen=%lld\n", ccc, AsciiStrSize(ccc), AsciiStrLen(ccc), sizeof(ccc), iStrLen(ccc, 10)); + XString ddd = "Выход "_XS; // size_t sizex = ddd.allocatedSize(); - DBG(" xstring %s, asize=%lld, sizeinbyte=%lld sizeof=%ld lastcharat=%lld\n", ddd.c_str(), ddd.allocatedSize(), ddd.sizeInBytes(), sizeof(ddd), + DBG(" xstring %s, asize=%ld, sizeinbyte=%ld sizeof=%ld lastcharat=%ld\n", ddd.c_str(), ddd.allocatedSize(), ddd.sizeInBytes(), sizeof(ddd), ddd.indexOf(ddd.LastChar())); CHAR8 compatible[64]; UINT32 FakeLAN = 0x0030168c;