File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ SRC += analyses/ai/ai.cpp \
1515 analyses/does_remove_const/does_type_preserve_const_correctness.cpp \
1616 analyses/does_remove_const/is_type_at_least_as_const_as.cpp \
1717 ansi-c/max_malloc_size.cpp \
18+ ansi-c/type2name.cpp \
1819 big-int/big-int.cpp \
1920 compound_block_locations.cpp \
2021 get_goto_model_from_c_test.cpp \
Original file line number Diff line number Diff line change 1+ /* ******************************************************************\
2+
3+ Module: Unit tests for type_name2type_identifier
4+
5+ Author: Thomas Spriggs
6+
7+ \*******************************************************************/
8+
9+ #include < testing-utils/use_catch.h>
10+
11+ extern std::string type_name2type_identifier (const std::string &name);
12+
13+ TEST_CASE (
14+ " type_name2type_identifier sanity check" ,
15+ " [core][ansi-c][type_name2type_identifier]" )
16+ {
17+ CHECK (type_name2type_identifier (" char" ) == " char" );
18+ }
19+
20+ TEST_CASE (
21+ " type_name2type_identifier special characters" ,
22+ " [core][ansi-c][type_name2type_identifier]" )
23+ {
24+ CHECK (type_name2type_identifier (" char*" ) == " char_ptr_" );
25+ CHECK (type_name2type_identifier (" foo{bar}" ) == " foo_start_sub_bar_end_sub_" );
26+ }
You can’t perform that action at this time.
0 commit comments