Skip to content

Commit f38a2ab

Browse files
committed
Merge branch 'feature/appVeyor'
2 parents 99bc341 + bf1e259 commit f38a2ab

File tree

5 files changed

+45
-8
lines changed

5 files changed

+45
-8
lines changed

.appveyor.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: "{build}"
2+
3+
environment:
4+
CTEST_OUTPUT_ON_FAILURE: '1'
5+
matrix:
6+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
7+
VCVARS_COMMANDLINE: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86'
8+
CMAKE_GENERATOR: Visual Studio 14 2015
9+
QT_DIR: C:\Qt\5.8\msvc2015
10+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
11+
VCVARS_COMMANDLINE: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86'
12+
CMAKE_GENERATOR: Visual Studio 14 2015
13+
QT_DIR: C:\Qt\5.6\msvc2015
14+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
15+
VCVARS_COMMANDLINE: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" x86'
16+
CMAKE_GENERATOR: Visual Studio 12 2013
17+
QT_DIR: C:\Qt\5.8\msvc2013
18+
19+
before_build:
20+
- call %VCVARS_COMMANDLINE%
21+
- set Path=%QT_DIR%\bin;%Path%
22+
- set QT_QPA_PLATFORM_PLUGIN_PATH=%QT_DIR%\plugins
23+
- cd tests
24+
- mkdir _build
25+
- cd _build
26+
- cmake -G "%CMAKE_GENERATOR%" ..
27+
28+
build:
29+
project: tests\_build\ALL_BUILD.vcxproj
30+
31+
32+
test_script:
33+
- msbuild "%APPVEYOR_BUILD_FOLDER%\tests\_build\RUN_TESTS.vcxproj" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.*
22
!.gitignore
3+
!.appveyor.yml
34
build/
45
.build/
56
_build/

HttpStatusCodes_C.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,19 +99,19 @@ enum HttpStatus_Code
9999
HttpStatus_NetworkAuthenticationRequired = 511 /*!< Indicates that the client needs to authenticate to gain network access. */ //!< HttpStatus_NetworkAuthenticationRequired
100100
};
101101

102-
inline char HttpStatus_isInformational(int code) { return (code >= 100 && code < 200); } /*!< \returns \c true if the given \p code is an informational code. */
103-
inline char HttpStatus_isSuccessful(int code) { return (code >= 200 && code < 300); } /*!< \returns \c true if the given \p code is a successful code. */
104-
inline char HttpStatus_isRedirection(int code) { return (code >= 300 && code < 400); } /*!< \returns \c true if the given \p code is a redirectional code. */
105-
inline char HttpStatus_isClientError(int code) { return (code >= 400 && code < 500); } /*!< \returns \c true if the given \p code is a client error code. */
106-
inline char HttpStatus_isServerError(int code) { return (code >= 500 && code < 600); } /*!< \returns \c true if the given \p code is a server error code. */
107-
inline char HttpStatus_isError(int code) { return (code >= 400); } /*!< \returns \c true if the given \p code is any type of error code. */
102+
static char HttpStatus_isInformational(int code) { return (code >= 100 && code < 200); } /*!< \returns \c true if the given \p code is an informational code. */
103+
static char HttpStatus_isSuccessful(int code) { return (code >= 200 && code < 300); } /*!< \returns \c true if the given \p code is a successful code. */
104+
static char HttpStatus_isRedirection(int code) { return (code >= 300 && code < 400); } /*!< \returns \c true if the given \p code is a redirectional code. */
105+
static char HttpStatus_isClientError(int code) { return (code >= 400 && code < 500); } /*!< \returns \c true if the given \p code is a client error code. */
106+
static char HttpStatus_isServerError(int code) { return (code >= 500 && code < 600); } /*!< \returns \c true if the given \p code is a server error code. */
107+
static char HttpStatus_isError(int code) { return (code >= 400); } /*!< \returns \c true if the given \p code is any type of error code. */
108108

109109
/*! Returns the standard HTTP reason phrase for a HTTP status code.
110110
* \param code An HTTP status code.
111111
* \return The standard HTTP reason phrase for the given \p code or \c NULL if no standard
112112
* phrase for the given \p code is known.
113113
*/
114-
inline const char* HttpStatus_reasonPhrase(int code)
114+
static const char* HttpStatus_reasonPhrase(int code)
115115
{
116116
switch (code)
117117
{

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# HTTP Status Codes and Reason Phrases for C, C++ and Qt #
22

3+
[![Build status](https://ci.appveyor.com/api/projects/status/ijp196mjo0vsover/branch/master?svg=true)](https://ci.appveyor.com/project/j-ulrich/http-status-codes-cpp/branch/master)
4+
5+
36
This repository provides the HTTP status codes and reason phrases in different variants for C/C++.
47

58
Simply take the variant that fits your needs and copy/use/modify it.

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ HunterGate(
88
SHA1 "ad19af382dfc285a255b91c713b651216e6feff2"
99
)
1010

11-
project(HttpStatusCodes)
11+
project(HttpStatusCodesTests)
1212

1313
set (CMAKE_CXX_STANDARD 11)
1414

0 commit comments

Comments
 (0)