-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: integrate handlebars and boost.url test suite
This change integrates the test suite library developed for handlebars with the test suite library from boost.url that is being used for other tests. With this integration, Handlebars tests are listed among any other tests in the library. The features used for handlebars, such as the expression decomposer and the diff algorithm for golden master tests, have been integrated into the test library from Boost.URL. fix #390, #384
- Loading branch information
1 parent
e4947d8
commit e14fe08
Showing
15 changed files
with
766 additions
and
662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// Copyright (c) 2023 Alan de Freitas ([email protected]) | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
// | ||
// Official repository: https://github.com/boostorg/url | ||
// | ||
|
||
#include "decomposer.hpp" | ||
|
||
#if __has_include(<cxxabi.h>) | ||
#include <cxxabi.h> | ||
#endif | ||
|
||
namespace test_suite { | ||
namespace detail { | ||
std::string demangle(const char *mangled) | ||
{ | ||
#if __has_include(<cxxabi.h>) | ||
int status; | ||
char *demangled = abi::__cxa_demangle(mangled, nullptr, nullptr, &status); | ||
std::string result; | ||
if (status == 0) { | ||
result = demangled; | ||
} else { | ||
result = mangled; | ||
} | ||
std::free(demangled); | ||
return result; | ||
#else | ||
return mangled; | ||
#endif | ||
} | ||
} // detail | ||
} // test_suite |
Oops, something went wrong.