Files
spirit_x4/test/x4/and_predicate.cpp
Nana Sakisaka 05bf2eb30b Migrate to Catch2 (#48)
* Migrate to Catch2

* Enable colors in Catch2

* CI: Cache Catch2

* Remove unused variable

* Supply compiler flags to `Catch2WithMain`

* CI: Fix Catch2 cache

* Fix styling
2025-09-25 17:26:35 +09:00

23 lines
706 B
C++

/*=============================================================================
Copyright (c) 2001-2015 Joel de Guzman
Copyright (c) 2025 Nana Sakisaka
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)
=============================================================================*/
#include "test.hpp"
#include <boost/spirit/x4/numeric/int.hpp>
#include <boost/spirit/x4/operator/and_predicate.hpp>
TEST_CASE("and_predicate")
{
using x4::int_;
BOOST_SPIRIT_X4_ASSERT_CONSTEXPR_CTORS(&int_);
CHECK(parse("1234", &int_).is_partial_match());
CHECK(!parse("abcd", &int_));
}