Skip to content

Commit 1fb412b

Browse files
authored
Merge pull request #100 from robotology/devel
Merge devel in master for the 1.6.0 release
2 parents 8594e15 + f079330 commit 1fb412b

File tree

10 files changed

+26
-27
lines changed

10 files changed

+26
-27
lines changed

.appveyor.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ platform:
55
- x64
66

77
image:
8-
- Visual Studio 2013
98
- Visual Studio 2015
109
- Visual Studio 2017
1110

@@ -21,18 +20,13 @@ environment:
2120
- BUILD_SHARED_LIBS: ON
2221
- BUILD_SHARED_LIBS: OFF
2322

24-
matrix:
25-
exclude:
26-
- image: Visual Studio 2013
27-
BUILD_SHARED_LIBS: OFF
2823

2924
clone_folder: c:\dev\RTF
3025

3126
init:
3227
# System related variables
3328
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2017" set CMAKE_GENERATOR=Visual Studio 15 2017
3429
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2015" set CMAKE_GENERATOR=Visual Studio 14 2015
35-
- cmd: if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" set CMAKE_GENERATOR=Visual Studio 12 2013
3630
- cmd: if "%platform%"=="x64" set CMAKE_GENERATOR=%CMAKE_GENERATOR% Win64
3731
- cmd: echo CMAKE_GENERATOR=%CMAKE_GENERATOR%
3832

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ before_install:
2222
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
2323
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
2424
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew tap robotology/cask; fi
25-
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew tap homebrew/science; fi
25+
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew tap homebrew/core; fi
2626
install:
2727
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew outdated cmake || brew upgrade cmake; fi
2828
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then if ! brew ls --versions python > /dev/null; then brew install python; fi; fi

conf/RTFVersion.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
## manually increase tweak number when required. Set to zero when
99
# bumping VERSION_PATCH
1010
set(RTF_VERSION_MAJOR "1")
11-
set(RTF_VERSION_MINOR "4")
12-
set(RTF_VERSION_PATCH "1")
11+
set(RTF_VERSION_MINOR "6")
12+
set(RTF_VERSION_PATCH "0")
1313
set(RTF_VERSION_TWEAK "")
1414
set(RTF_VERSION_STRING "")
1515

doc/release/v1_6_0.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Robot Testing Framework 1.6.0 (2018-9-09) Release Notes
2+
========================================================
3+
4+
Important Changes
5+
-----------------
6+
7+
* Visual Studio 2013 is no longer supported, due to the use of constexpr in VOCAB4 macro ( https://github.com/robotology/robot-testing/pull/98 ).
8+

src/plugins/dll/include/rtf/dll/SharedLibraryClassApi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extern "C" {
8181
SHLIBPP_SHARED_CLASS_FN int factoryname(void *api, int len) { \
8282
struct shlibpp::SharedLibraryClassApi *sapi = (struct shlibpp::SharedLibraryClassApi *) api; \
8383
if (len<(int)sizeof(shlibpp::SharedLibraryClassApi)) return -1; \
84-
sapi->startCheck = VOCAB4('S','H','P','P'); \
84+
sapi->startCheck = shlibpp::VOCAB('S','H','P','P'); \
8585
sapi->structureSize = sizeof(shlibpp::SharedLibraryClassApi); \
8686
sapi->systemVersion = 5; \
8787
sapi->create = factoryname ## _create; \
@@ -91,7 +91,7 @@ extern "C" {
9191
sapi->getClassName = factoryname ## _getClassName; \
9292
sapi->getBaseClassName = factoryname ## _getBaseClassName; \
9393
for (int i=0; i<SHLIBPP_SHAREDLIBRARYCLASSAPI_PADDING; i++) { sapi->roomToGrow[i] = 0; } \
94-
sapi->endCheck = VOCAB4('P', 'L', 'U', 'G'); \
94+
sapi->endCheck = shlibpp::VOCAB('P', 'L', 'U', 'G'); \
9595
return sapi->startCheck; \
9696
}
9797
// The double cast in the _create() and _destroy() functions are

src/plugins/dll/include/rtf/dll/SharedLibraryFactory.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ class shlibpp::SharedLibraryFactory {
3737
*/
3838
enum {
3939
STATUS_NONE, //!< Not configured yet.
40-
STATUS_OK = VOCAB2('o','k'), //!< Present and sane.
41-
STATUS_LIBRARY_NOT_FOUND = VOCAB4('f', 'o', 'u', 'n'), //!< Named shared library was not found.
42-
STATUS_LIBRARY_NOT_LOADED = VOCAB4('l','o','a','d'), //!< Named shared library failed to load.
43-
STATUS_FACTORY_NOT_FOUND = VOCAB4('f','a','c','t'), //!< Named method wasn't present in library.
44-
STATUS_FACTORY_NOT_FUNCTIONAL = VOCAB3('r','u','n') //!< Named method is not working right.
40+
STATUS_OK = VOCAB('o','k'), //!< Present and sane.
41+
STATUS_LIBRARY_NOT_FOUND = VOCAB('f', 'o', 'u', 'n'), //!< Named shared library was not found.
42+
STATUS_LIBRARY_NOT_LOADED = VOCAB('l','o','a','d'), //!< Named shared library failed to load.
43+
STATUS_FACTORY_NOT_FOUND = VOCAB('f','a','c','t'), //!< Named method wasn't present in library.
44+
STATUS_FACTORY_NOT_FUNCTIONAL = VOCAB('r','u','n') //!< Named method is not working right.
4545
};
4646

4747
/**

src/plugins/dll/include/rtf/dll/Vocab.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ namespace shlibpp {
1616
class Vocab;
1717

1818
// We need a macro for efficient switching.
19-
#define VOCAB(a,b,c,d) ((((int)(d))<<24)+(((int)(c))<<16)+(((int)(b))<<8)+((int)(a)))
20-
#define VOCAB4(a,b,c,d) VOCAB((a),(b),(c),(d))
21-
#define VOCAB3(a,b,c) VOCAB((a),(b),(c),(0))
22-
#define VOCAB2(a,b) VOCAB((a),(b),(0),(0))
19+
constexpr int32_t VOCAB(char a, char b = 0, char c = 0, char d = 0) { return ((((int32_t)(d))<<24)+(((int32_t)(c))<<16)+(((int32_t)(b))<<8)+((int32_t)(a))); }
2320
}
2421

2522

src/plugins/dll/include/rtf/dll/impl/DllPluginLoader_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class DllPluginLoaderImpl {
6262
open_internal(filename, factory_name);
6363

6464
if (!plugin->factory.isValid()) {
65-
if (plugin->factory.getStatus() == VOCAB4('f', 'a', 'c', 't')) {
65+
if (plugin->factory.getStatus() == shlibpp::VOCAB('f', 'a', 'c', 't')) {
6666
std::string plug_type = (factory_name == RTF_PLUGIN_FACTORY_NAME) ? "test case" : "fixture manager";
6767
error = "cannot load plugin " + filename + "; (it is not a RTF " + plug_type + " plugin!)";
6868
}

src/plugins/dll/src/SharedLibraryFactory.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ bool shlibpp::SharedLibraryFactory::open(const char *dll_name, const char *fn_na
7878

7979
bool shlibpp::SharedLibraryFactory::isValid() const
8080
{
81-
if (returnValue != VOCAB4('S','H','P','P')) {
81+
if (returnValue != VOCAB('S','H','P','P')) {
8282
return false;
8383
}
84-
if (api.startCheck != VOCAB4('S','H','P','P')) {
84+
if (api.startCheck != VOCAB('S','H','P','P')) {
8585
return false;
8686
}
8787
if (api.structureSize != sizeof(SharedLibraryClassApi)) {
@@ -90,7 +90,7 @@ bool shlibpp::SharedLibraryFactory::isValid() const
9090
if (api.systemVersion != 5) {
9191
return false;
9292
}
93-
if (api.endCheck != VOCAB4('P','L','U','G')) {
93+
if (api.endCheck != VOCAB('P','L','U','G')) {
9494
return false;
9595
}
9696
return true;

tests/api/VocabTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ class MyTest : public TestCase {
2323
virtual void run() {
2424
RTF_TEST_CHECK(Vocab::encode("RTF") == (int)4609106, "checking Vocab::encode()");
2525
RTF_TEST_CHECK(Vocab::decode( Vocab::encode("RRTF")) == "RRTF", "checking Vocab::decode()");
26-
RTF_TEST_CHECK(Vocab::decode( VOCAB2('R','T')) == "RT", "checking VOCAB2");
27-
RTF_TEST_CHECK(Vocab::decode( VOCAB3('R','T', 'F')) == "RTF", "checking VOCAB3");
28-
RTF_TEST_CHECK(Vocab::decode( VOCAB4('R','T', 'F', 'R')) == "RTFR", "checking VOCAB4");
26+
RTF_TEST_CHECK(Vocab::decode( VOCAB('R','T')) == "RT", "checking VOCAB");
27+
RTF_TEST_CHECK(Vocab::decode( VOCAB('R','T', 'F')) == "RTF", "checking VOCAB");
28+
RTF_TEST_CHECK(Vocab::decode( VOCAB('R','T', 'F', 'R')) == "RTFR", "checking VOCAB");
2929
}
3030
};
3131

0 commit comments

Comments
 (0)