forked from ArcheGraphics/HydraViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
002ba38
commit a16770f
Showing
6 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2024 Feng Yang | ||
# | ||
# I am making my contributions/submissions to this project solely in my | ||
# personal capacity and am not conveying any rights to any intellectual | ||
# property of any third parties. | ||
|
||
cmake_minimum_required(VERSION 3.16) | ||
project(tests LANGUAGES CXX) | ||
|
||
qt_standard_project_setup() | ||
|
||
qt_add_executable(${PROJECT_NAME} | ||
main.cpp | ||
test_qstring.cpp | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} PRIVATE | ||
Qt6::Core | ||
Qt6::Test | ||
Qt6::Widgets | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) 2024 Feng Yang | ||
// | ||
// I am making my contributions/submissions to this project solely in my | ||
// personal capacity and am not conveying any rights to any intellectual | ||
// property of any third parties. | ||
|
||
#include <Qtest> | ||
|
||
#include "test_qstring.h" | ||
|
||
int main(int argc, char *argv[]) { | ||
int status = 0; | ||
status |= QTest::qExec(new TestQString, argc, argv); | ||
|
||
return status; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) 2024 Feng Yang | ||
// | ||
// I am making my contributions/submissions to this project solely in my | ||
// personal capacity and am not conveying any rights to any intellectual | ||
// property of any third parties. | ||
|
||
#include "test_qstring.h" | ||
|
||
void TestQString::toUpper() { | ||
QString str = "Hello"; | ||
QVERIFY(str.toUpper() == "HELLO"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2024 Feng Yang | ||
// | ||
// I am making my contributions/submissions to this project solely in my | ||
// personal capacity and am not conveying any rights to any intellectual | ||
// property of any third parties. | ||
|
||
#pragma once | ||
|
||
#include <QTest> | ||
|
||
class TestQString : public QObject { | ||
Q_OBJECT | ||
private slots: | ||
void toUpper(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters