Phil Nash | 7673a30 | 2012-11-15 22:15:41 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Created by Phil on 13/11/2012. |
| 3 | * Copyright 2012 Two Blue Cubes Ltd. All rights reserved. |
| 4 | * |
| 5 | * Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 6 | * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 7 | */ |
| 8 | #ifndef TWOBLUECUBES_CATCH_VERSION_H_INCLUDED |
| 9 | #define TWOBLUECUBES_CATCH_VERSION_H_INCLUDED |
| 10 | |
| 11 | namespace Catch { |
| 12 | |
| 13 | // Versioning information |
| 14 | struct Version { |
Phil Nash | b56aaf4 | 2012-12-01 23:42:47 +0000 | [diff] [blame] | 15 | Version( unsigned int _majorVersion, |
| 16 | unsigned int _minorVersion, |
Phil Nash | 21f7ef6 | 2015-06-29 18:05:23 +0100 | [diff] [blame] | 17 | unsigned int _patchNumber, |
| 18 | std::string const& _branchName, |
| 19 | unsigned int _buildNumber ); |
Phil Nash | b56aaf4 | 2012-12-01 23:42:47 +0000 | [diff] [blame] | 20 | |
Phil Nash | 7303b2b | 2014-04-18 08:28:52 +0100 | [diff] [blame] | 21 | unsigned int const majorVersion; |
| 22 | unsigned int const minorVersion; |
Phil Nash | 21f7ef6 | 2015-06-29 18:05:23 +0100 | [diff] [blame] | 23 | unsigned int const patchNumber; |
Phil Nash | 2e3c5fa | 2013-03-25 08:46:48 +0000 | [diff] [blame] | 24 | |
Phil Nash | 21f7ef6 | 2015-06-29 18:05:23 +0100 | [diff] [blame] | 25 | // buildNumber is only used if branchName is not null |
| 26 | std::string const branchName; |
| 27 | unsigned int const buildNumber; |
| 28 | |
| 29 | friend std::ostream& operator << ( std::ostream& os, Version const& version ); |
Phil Nash | e917381 | 2015-11-04 18:01:28 +0000 | [diff] [blame] | 30 | |
Phil Nash | 503d5d0 | 2013-07-03 08:25:11 +0100 | [diff] [blame] | 31 | private: |
| 32 | void operator=( Version const& ); |
Phil Nash | 7673a30 | 2012-11-15 22:15:41 +0000 | [diff] [blame] | 33 | }; |
| 34 | |
Kevin Ushey | e04dc51 | 2017-03-16 11:17:45 -0700 | [diff] [blame^] | 35 | inline Version libraryVersion(); |
Phil Nash | 7673a30 | 2012-11-15 22:15:41 +0000 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | #endif // TWOBLUECUBES_CATCH_VERSION_H_INCLUDED |