C++17 u8 character literals testcase

Issue #1450
This commit is contained in:
Zackery Spytz 2019-02-10 15:53:42 +00:00 committed by William S Fulton
commit e4759ae250
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,8 @@
%module cpp17_u8_char_literals
%inline %{
// UTF-8 character literals will (apparently) have type char8_t in C++20.
char a = u8'a';
char u = u8'u';
char u8 = u8'8';
%}

View file

@ -0,0 +1,10 @@
from cpp17_u8_char_literals import *
if cvar.a != 'a':
raise RuntimeError
if cvar.u != 'u':
raise RuntimeError
if cvar.u8 != '8':
raise RuntimeError