tests: don't use == to compare const char *...

Reported by Dagobert Michelsen.
https://lists.gnu.org/r/bug-bison/2020-05/msg00091.html

* tests/c++.at: here.
This commit is contained in:
Akim Demaille
2020-05-12 18:37:49 +02:00
parent 78c7fb6460
commit dbaed0bbf2
2 changed files with 5 additions and 2 deletions

3
NEWS
View File

@@ -2,6 +2,9 @@ GNU Bison NEWS
* Noteworthy changes in release ?.? (????-??-??) [?] * Noteworthy changes in release ?.? (????-??-??) [?]
** Bug fixes
Some tests were fixed.
* Noteworthy changes in release 3.6.1 (2020-05-10) [stable] * Noteworthy changes in release 3.6.1 (2020-05-10) [stable]

View File

@@ -161,8 +161,8 @@ int main()
{ {
parser::symbol_type s = parser::make_INT (12); parser::symbol_type s = parser::make_INT (12);
assert_eq (s.kind (), parser::symbol_kind::S_INT); assert_eq (s.kind (), parser::symbol_kind::S_INT);
assert_eq (parser::symbol_name (s.kind ()), "\"int\""); assert_eq (parser::symbol_name (s.kind ()), std::string ("\"int\""));
assert_eq (s.name (), "\"int\""); assert_eq (s.name (), std::string ("\"int\""));
assert_eq (s.value.as<int> (), 12); assert_eq (s.value.as<int> (), 12);
} }