[Bug]-[Arduino-0022]-[ArduinoTestSuite.cpp]-enum ends with comma

I tried compiling the ArduinoTestSuite.cpp, and I got an error on the enum below. The problem is, that the last item in the enum ends with a comma. When removing the comma, it compiles fine.

Snippet from version 0022 ArduinoTestSuite.cpp:

enum 
{
    ATS_Manufacturer    =   1,
    ATS_CPU,
    ATS_GCC_version,
    ATS_LIBC_version,
    ATS_CompiledDate,
    ATS_TestSuiteName,
    ATS_FreeMemory,


};

Hmmm seems like nobody cares...

I think it's really sloppy, and it proves that code changes are made and released for "production" without testing or even compiling the modified code! :astonished:

Hmmm seems like nobody cares...

Lack of reply does not indicate lack of care.

I think it's really sloppy

Not necessarily. It is possible the person who wrote the code is using a different version of the compiler than you are using; a version that accepts that syntax. It could have been a simple oversight.

and it proves that code changes are made and released for "production" without testing or even compiling the modified code!

The code in question is technically not "production". It was used to help port the core to various boards. I suspect it was included with the distribution so that folks like you would have an opportunity to play with it, critique it, and possibly enhance it. I believe the ultimate goal is to provide a set of sketches the user can run to determine if their board is functioning correctly.

There does appear to be a lack of communication regarding the Test Suite. But a lack of communication is one of the barbs we must endure with open source projects.

Jeroenvw: When removing the comma, it compiles fine.

On some compilers, the final enum can have a comma, while on others, no. Can't seem to find out what the C standard allows, so it may not be sloppy code, just code written on another compiler.

Hmm I didn't know that... my understanding is that most compilers do not allow it. Most people use gcc/g++ and I think these compilers do not support it. That's why I think it would be nice if in the next release the comma is ommited :)

Thanks and happy coding!