Skip to content

Support step definitions with multi-byte characters #224

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

Merged
merged 4 commits into from
Aug 4, 2021
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
2 changes: 2 additions & 0 deletions 3rdparty/json_spirit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ target_sources(json_spirit.header INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_stream_reader.h
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_utils.h
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_value.h
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_writer_options.h
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_writer_template.h
)
target_include_directories(json_spirit.header SYSTEM
Expand All @@ -22,5 +23,6 @@ add_library(json_spirit STATIC EXCLUDE_FROM_ALL
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_value.cpp
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_writer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_writer.h
${CMAKE_CURRENT_SOURCE_DIR}/json_spirit_writer_options.h
)
target_link_libraries(json_spirit PUBLIC json_spirit.header)
4 changes: 2 additions & 2 deletions 3rdparty/json_spirit/json_spirit.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef JSON_SPIRIT
#define JSON_SPIRIT

// Copyright John W. Wilkinson 2007 - 2009.
// Copyright John W. Wilkinson 2007 - 2014
// Distributed under the MIT License, see accompanying file LICENSE.txt

// json spirit version 4.03
// json spirit version 4.08

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
Expand Down
4 changes: 4 additions & 0 deletions 3rdparty/json_spirit/json_spirit.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@
RelativePath=".\json_spirit_writer.h"
>
</File>
<File
RelativePath=".\json_spirit_writer_options.h"
>
</File>
<File
RelativePath=".\json_spirit_writer_template.h"
>
Expand Down
6 changes: 3 additions & 3 deletions 3rdparty/json_spirit/json_spirit_error_position.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef JSON_SPIRIT_ERROR_POSITION
#define JSON_SPIRIT_ERROR_POSITION

// Copyright John W. Wilkinson 2007 - 2009.
// Copyright John W. Wilkinson 2007 - 2014
// Distributed under the MIT License, see accompanying file LICENSE.txt

// json spirit version 4.03
// json spirit version 4.08

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
Expand Down Expand Up @@ -48,7 +48,7 @@ namespace json_spirit
return ( reason_ == lhs.reason_ ) &&
( line_ == lhs.line_ ) &&
( column_ == lhs.column_ );
}
}
}

#endif
248 changes: 124 additions & 124 deletions 3rdparty/json_spirit/json_spirit_reader.cpp
Original file line number Diff line number Diff line change
@@ -1,137 +1,137 @@
// Copyright John W. Wilkinson 2007 - 2009.
// Copyright John W. Wilkinson 2007 - 2014
// Distributed under the MIT License, see accompanying file LICENSE.txt

// json spirit version 4.03
// json spirit version 4.08

#include "json_spirit_reader.h"
#include "json_spirit_reader_template.h"

using namespace json_spirit;

bool json_spirit::read( const std::string& s, Value& value )
{
return read_string( s, value );
}

void json_spirit::read_or_throw( const std::string& s, Value& value )
{
read_string_or_throw( s, value );
}

bool json_spirit::read( std::istream& is, Value& value )
{
return read_stream( is, value );
}

void json_spirit::read_or_throw( std::istream& is, Value& value )
{
read_stream_or_throw( is, value );
}

bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
{
return read_range( begin, end, value );
}

void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
{
begin = read_range_or_throw( begin, end, value );
}

#ifndef BOOST_NO_STD_WSTRING

bool json_spirit::read( const std::wstring& s, wValue& value )
{
return read_string( s, value );
}

void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
{
read_string_or_throw( s, value );
}

bool json_spirit::read( std::wistream& is, wValue& value )
{
return read_stream( is, value );
}

void json_spirit::read_or_throw( std::wistream& is, wValue& value )
{
read_stream_or_throw( is, value );
}

bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
{
return read_range( begin, end, value );
}

void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
{
begin = read_range_or_throw( begin, end, value );
}
#ifdef JSON_SPIRIT_VALUE_ENABLED
bool json_spirit::read( const std::string& s, Value& value )
{
return read_string( s, value );
}

void json_spirit::read_or_throw( const std::string& s, Value& value )
{
read_string_or_throw( s, value );
}

bool json_spirit::read( std::istream& is, Value& value )
{
return read_stream( is, value );
}

void json_spirit::read_or_throw( std::istream& is, Value& value )
{
read_stream_or_throw( is, value );
}

bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
{
return read_range( begin, end, value );
}

void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value )
{
begin = read_range_or_throw( begin, end, value );
}
#endif

#if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
bool json_spirit::read( const std::wstring& s, wValue& value )
{
return read_string( s, value );
}

void json_spirit::read_or_throw( const std::wstring& s, wValue& value )
{
read_string_or_throw( s, value );
}

bool json_spirit::read( std::wistream& is, wValue& value )
{
return read_stream( is, value );
}

void json_spirit::read_or_throw( std::wistream& is, wValue& value )
{
read_stream_or_throw( is, value );
}

bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
{
return read_range( begin, end, value );
}

void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value )
{
begin = read_range_or_throw( begin, end, value );
}
#endif

bool json_spirit::read( const std::string& s, mValue& value )
{
return read_string( s, value );
}

void json_spirit::read_or_throw( const std::string& s, mValue& value )
{
read_string_or_throw( s, value );
}

bool json_spirit::read( std::istream& is, mValue& value )
{
return read_stream( is, value );
}

void json_spirit::read_or_throw( std::istream& is, mValue& value )
{
read_stream_or_throw( is, value );
}

bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
{
return read_range( begin, end, value );
}

void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
{
begin = read_range_or_throw( begin, end, value );
}

#ifndef BOOST_NO_STD_WSTRING

bool json_spirit::read( const std::wstring& s, wmValue& value )
{
return read_string( s, value );
}

void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
{
read_string_or_throw( s, value );
}

bool json_spirit::read( std::wistream& is, wmValue& value )
{
return read_stream( is, value );
}

void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
{
read_stream_or_throw( is, value );
}

bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
{
return read_range( begin, end, value );
}

void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
{
begin = read_range_or_throw( begin, end, value );
}
#ifdef JSON_SPIRIT_MVALUE_ENABLED
bool json_spirit::read( const std::string& s, mValue& value )
{
return read_string( s, value );
}

void json_spirit::read_or_throw( const std::string& s, mValue& value )
{
read_string_or_throw( s, value );
}

bool json_spirit::read( std::istream& is, mValue& value )
{
return read_stream( is, value );
}

void json_spirit::read_or_throw( std::istream& is, mValue& value )
{
read_stream_or_throw( is, value );
}

bool json_spirit::read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
{
return read_range( begin, end, value );
}

void json_spirit::read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value )
{
begin = read_range_or_throw( begin, end, value );
}
#endif

#if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
bool json_spirit::read( const std::wstring& s, wmValue& value )
{
return read_string( s, value );
}

void json_spirit::read_or_throw( const std::wstring& s, wmValue& value )
{
read_string_or_throw( s, value );
}

bool json_spirit::read( std::wistream& is, wmValue& value )
{
return read_stream( is, value );
}

void json_spirit::read_or_throw( std::wistream& is, wmValue& value )
{
read_stream_or_throw( is, value );
}

bool json_spirit::read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
{
return read_range( begin, end, value );
}

void json_spirit::read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value )
{
begin = read_range_or_throw( begin, end, value );
}
#endif
16 changes: 8 additions & 8 deletions 3rdparty/json_spirit/json_spirit_reader.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef JSON_SPIRIT_READER
#define JSON_SPIRIT_READER

// Copyright John W. Wilkinson 2007 - 2009.
// Copyright John W. Wilkinson 2007 - 2014
// Distributed under the MIT License, see accompanying file LICENSE.txt

// json spirit version 4.03
// json spirit version 4.08

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
Expand All @@ -18,44 +18,44 @@ namespace json_spirit
{
// functions to reads a JSON values

#ifdef JSON_SPIRIT_VALUE_ENABLED
bool read( const std::string& s, Value& value );
bool read( std::istream& is, Value& value );
bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );

void read_or_throw( const std::string& s, Value& value );
void read_or_throw( std::istream& is, Value& value );
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value );
#endif

#ifndef BOOST_NO_STD_WSTRING

#if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
bool read( const std::wstring& s, wValue& value );
bool read( std::wistream& is, wValue& value );
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );

void read_or_throw( const std::wstring& s, wValue& value );
void read_or_throw( std::wistream& is, wValue& value );
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value );

#endif

#ifdef JSON_SPIRIT_MVALUE_ENABLED
bool read( const std::string& s, mValue& value );
bool read( std::istream& is, mValue& value );
bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );

void read_or_throw( const std::string& s, mValue& value );
void read_or_throw( std::istream& is, mValue& value );
void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value );
#endif

#ifndef BOOST_NO_STD_WSTRING

#if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING )
bool read( const std::wstring& s, wmValue& value );
bool read( std::wistream& is, wmValue& value );
bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );

void read_or_throw( const std::wstring& s, wmValue& value );
void read_or_throw( std::wistream& is, wmValue& value );
void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value );

#endif
}

Expand Down
Loading