Download tests/src/App/Application.cpp from AbdulElahGwaith/FreeCAD: direct link, hf CLI and curl.
- Browser
- Download file 1.28 kB
-
https://huggingface.co/AbdulElahGwaith/FreeCAD/resolve/main/tests/src/App/Application.cpp
- Command line
-
hf download hf://AbdulElahGwaith/FreeCAD/tests/src/App/Application.cpp
-
curl -L -o Application.cpp https://huggingface.co/AbdulElahGwaith/FreeCAD/resolve/main/tests/src/App/Application.cpp
1.28 kB
| // SPDX-License-Identifier: LGPL-2.1-or-later | |
| using namespace App::Util; | |
| using Spr = std::pair<std::string, std::string>; | |
| class ApplicationTest: public ::testing::Test | |
| { | |
| protected: | |
| static void SetUpTestSuite() | |
| { | |
| tests::initApplication(); | |
| } | |
| }; | |
| TEST_F(ApplicationTest, fCustomSyntaxLookup) | |
| { | |
| Spr res {customSyntax("-display")}; | |
| Spr exp {"display", "null"}; | |
| EXPECT_EQ(res, exp); | |
| }; | |
| TEST_F(ApplicationTest, fCustomSyntaxMac) | |
| { | |
| Spr res {customSyntax("-psn_stuff")}; | |
| Spr exp {"psn", "stuff"}; | |
| EXPECT_EQ(res, exp); | |
| }; | |
| TEST_F(ApplicationTest, fCustomSyntaxWidgetCount) | |
| { | |
| Spr res {customSyntax("-widgetcount")}; | |
| Spr exp {"widgetcount", ""}; | |
| EXPECT_EQ(res, exp); | |
| } | |
| TEST_F(ApplicationTest, fCustomSyntaxNotFound) | |
| { | |
| Spr res {customSyntax("-displayx")}; | |
| Spr exp {"", ""}; | |
| EXPECT_EQ(res, exp); | |
| }; | |
| TEST_F(ApplicationTest, fCustomSyntaxAmpersand) | |
| { | |
| Spr res {customSyntax("@freddie")}; | |
| Spr exp {"response-file", "freddie"}; | |
| EXPECT_EQ(res, exp); | |
| }; | |
| TEST_F(ApplicationTest, fCustomSyntaxEmptyIn) | |
| { | |
| Spr res {customSyntax("")}; | |
| Spr exp {"", ""}; | |
| EXPECT_EQ(res, exp); | |
| }; | |