Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests1.exeにプリコンパイル済みヘッダーを導入する #2006

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tests/unittests/code-main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/eval_outputs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#include "util/string_ex.h"

Expand Down
25 changes: 25 additions & 0 deletions tests/unittests/pch.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*! @file */
/*
Copyright (C) 2025, Sakura Editor Organization

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but is
not required.

2. Altered source versions must be plainly marked as such,
and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.
*/
#include "pch.h"
27 changes: 27 additions & 0 deletions tests/unittests/pch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*! @file */
/*
Copyright (C) 2025, Sakura Editor Organization

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment
in the product documentation would be appreciated but is
not required.

2. Altered source versions must be plainly marked as such,
and must not be misrepresented as being the original software.

3. This notice may not be removed or altered from any source
distribution.
*/
#include "StdAfx.h"

#include <gmock/gmock.h>
2 changes: 1 addition & 1 deletion tests/unittests/test-StdControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"
#include "apiwrap/StdControl.h"

/*!
Expand Down
3 changes: 1 addition & 2 deletions tests/unittests/test-cclipboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-ccodebase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include "charset/CCodeFactory.h"

#include <cstdlib>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-ccommandline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cconvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include "convert/CConvert.h"

#include <ostream>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cdecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include <cstdlib>
#include <string>
#include "convert/CDecode.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cdlgopenfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"
#ifndef STRICT
#define STRICT 1
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cdlgprofilemgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cdocline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include "doc/logic/CDocLine.h"

#include <string_view>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cdoclinemgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include "doc/logic/CDocLineMgr.h"

#include <array>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cdoctypemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include <windows.h>
#include <string>
#include "mem/CNativeW.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-ceol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include "CEol.h"

/*!
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cerrorinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cfileext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-charcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
#define NOMINMAX
#include "charset/charcode.h"
#include <gtest/gtest.h>
#include "pch.h"
#include <algorithm>
#include <cstring>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-clayoutint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"
#include "mem/CMemory.h"

#include "_main/CNormalProcess.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cnative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
distribution.
*/
#include <stdexcept>
#include <gtest/gtest.h>
#include "pch.h"
#include "charset/charcode.h"
#include "mem/CNativeW.h"
#include "mem/CNativeA.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-codechecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include "charset/codechecker.h"

TEST(ConvertToUtf32, SurrogatePair)
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cppa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#include "macro/CPPA.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-crunningtimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"
#include "debug/CRunningTimer.h"

/*!
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-csakuraenvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-csearchagent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
distribution.
*/

#include <gtest/gtest.h>
#include "pch.h"
#include "CSaveAgent.h"

#include <array>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-csharedata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-ctextmetrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"
#include "view/CTextMetrics.h"
#include <vector>
#include <Windows.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-cwordparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"
#include "parse/CWordParse.h"

#include <cstring>
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-czipfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-design_template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-editinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-extmodules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#include "TExtModule.hpp"

Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"
#include <Windows.h>
#include "util/format.h"

Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-grepinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-int2dec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#include <limits>

Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/test-is_mailaddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. This notice may not be removed or altered from any source
distribution.
*/
#include <gtest/gtest.h>
#include "pch.h"

#ifndef NOMINMAX
#define NOMINMAX
Expand Down
Loading