From 6317ee40b7fa90067f59a29481f100f3fda8095e Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Sat, 13 Jul 2024 19:30:03 +0300 Subject: [PATCH] Improve NuGet packages restoration for first build --- Exteor.vcxproj | 48 +++++++++++++++---------------- NuGet.Config | 9 ++++++ test/XTRCoreTest.vcxproj | 52 +++++++++++++++++----------------- test/src/testTextProcessor.cpp | 24 ++++++++-------- 4 files changed, 71 insertions(+), 62 deletions(-) create mode 100644 NuGet.Config diff --git a/Exteor.vcxproj b/Exteor.vcxproj index 6e57d57..545f965 100644 --- a/Exteor.vcxproj +++ b/Exteor.vcxproj @@ -48,18 +48,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -495,17 +495,17 @@ copy "C:\Program Files (x86)\Python312-32\Python312_d.pdb" "$(OutDir)" This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..496f1a1 --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/test/XTRCoreTest.vcxproj b/test/XTRCoreTest.vcxproj index 5dcf90b..b8ad902 100644 --- a/test/XTRCoreTest.vcxproj +++ b/test/XTRCoreTest.vcxproj @@ -51,19 +51,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -264,18 +264,18 @@ copy "C:\Program Files (x86)\Python312-32\Python312.pdb" "$(OutDir)" This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/src/testTextProcessor.cpp b/test/src/testTextProcessor.cpp index b681aa8..a040f68 100644 --- a/test/src/testTextProcessor.cpp +++ b/test/src/testTextProcessor.cpp @@ -36,28 +36,28 @@ protected: TEST_F(UTPyTextProcessor, Inflect) { EXPECT_EQ(processor->Inflect("", Morphology{}), ""); EXPECT_EQ(processor->Inflect("", "sing,datv"_form), ""); - EXPECT_EQ(processor->Inflect(u8""_c17, Morphology{}), u8""_c17); - EXPECT_EQ(processor->Inflect(u8""_c17, "sing,datv"_form), u8""_c17); - EXPECT_EQ(processor->Inflect(u8" "_c17, "plur,datv"_form), u8" "_c17); - EXPECT_EQ(processor->Inflect(u8" "_c17, "ADJF,pres,datv"_form), u8" "_c17); - EXPECT_EQ(processor->Inflect(u8" "_c17, "past,masc"_form), u8" "_c17); - EXPECT_EQ(processor->Inflect(u8" "_c17, "past,masc"_form), u8" "_c17); + EXPECT_EQ(processor->Inflect(u8"слон"_c17, Morphology{}), u8"слон"_c17); + EXPECT_EQ(processor->Inflect(u8"слон"_c17, "sing,datv"_form), u8"слону"_c17); + EXPECT_EQ(processor->Inflect(u8"синий слон"_c17, "plur,datv"_form), u8"синим слонам"_c17); + EXPECT_EQ(processor->Inflect(u8"синий слон"_c17, "ADJF,pres,datv"_form), u8"синий слон"_c17); + EXPECT_EQ(processor->Inflect(u8"усиленно обеспечивать"_c17, "past,masc"_form), u8"усиленно обеспечивал"_c17); + EXPECT_EQ(processor->Inflect(u8"усиленно обеспечивать"_c17, "past,masc"_form), u8"усиленно обеспечивал"_c17); } TEST_F(UTPyTextProcessor, InflectDependant) { EXPECT_EQ(processor->InflectDependant("", ""), ""); EXPECT_EQ(processor->InflectDependant("", "invalid"), ""); EXPECT_EQ(processor->InflectDependant("invalid", ""), "invalid"); - EXPECT_EQ(processor->InflectDependant("", u8""_c17), ""); - EXPECT_EQ(processor->InflectDependant(u8""_c17, ""), u8""_c17); - EXPECT_EQ(processor->InflectDependant(u8""_c17, u8""_c17), u8""_c17); - EXPECT_EQ(processor->InflectDependant(u8" "_c17, u8" "_c17), u8" "_c17); + EXPECT_EQ(processor->InflectDependant("", u8"термин"_c17), ""); + EXPECT_EQ(processor->InflectDependant(u8"термином"_c17, ""), u8"термином"_c17); + EXPECT_EQ(processor->InflectDependant(u8"общий"_c17, u8"мать"_c17), u8"общая"_c17); + EXPECT_EQ(processor->InflectDependant(u8"могучий красивый"_c17, u8"русского богатыря"_c17), u8"могучего красивого"_c17); } TEST_F(UTPyTextProcessor, IsSubstr) { EXPECT_TRUE(processor->IsSubstr("", "")); EXPECT_TRUE(processor->IsSubstr("", "123")); EXPECT_FALSE(processor->IsSubstr("4", "123")); - EXPECT_TRUE(processor->IsSubstr(u8""_c17, u8""_c17)); - EXPECT_TRUE(processor->IsSubstr(u8" "_c17, u8" "_c17)); + EXPECT_TRUE(processor->IsSubstr(u8"человек"_c17, u8"люди"_c17)); + EXPECT_TRUE(processor->IsSubstr(u8"стильный человек"_c17, u8"стильными людьми"_c17)); }