cppcheck/addons/test/namingng_test.c
Thorsten Sick 43b6a391d8 Added a new naming check addon. Also verifies variable and function p… (#1456)
* Added a new naming check addon. Also verifies variable and function prefixes

* Verification added to code

* added naming checks ng selftest to travis file

* Ensure zero exit value for tests if tests succeed

* Expected values adjusted

* Fixed copy and paste error
2018-11-06 20:46:07 +01:00

51 lines
640 B
C

#include <stddef.h>
#include <inttypes.h>
uint32_t ui32Good (int a)
{
uint32_t ui32good;
int32_t i32good;
uint32_t badui32;
int32_t badi32;
uint32_t a; // Short
return 5;
}
uint16_t ui16Good (int a)
{
return 5;
}
uint16_t ui16bad_underscore (int a)
{
return 5;
}
uint32_t u32Bad (int a)
{
uint32_t ui32good;
int32_t i32good;
uint32_t badui32;
int32_t badi32;
int * intpointer=NULL;
int ** intppointer=NULL;
int *** intpppointer=NULL;
return 5;
}
uint16_t Badui16 (int a)
{
return 5;
}
void * Pointer()
{
return NULL;
}
void ** PPointer()
{
return NULL;
}