crt: tests: update t_tls

Previously, this test would simply print an error message if `tls_value` had
an unexpected value. Instead, exit with non-zero to signal an error.

When compiled with clang++, it was producing the following diagnostic:

mingw-w64/mingw-w64-crt/testcases/t_tls_cpp.cpp:29:20: warning: variable length arrays in C++ are a Clang extension [-Wvla-cxx-extension]
   29 |     HANDLE threads[processors];
      |                    ^~~~~~~~~~
mingw-w64/mingw-w64-crt/testcases/t_tls_cpp.cpp:29:20: note: initializer of 'processors' is not a constant expression
mingw-w64/mingw-w64-crt/testcases/t_tls_cpp.cpp:26:20: note: declared here
   26 |     const unsigned processors = si.dwNumberOfProcessors;
      |                    ^
1 warning generated.

To avoid this warning, use C++ new/delete operators instead of VLA.

Add t_tls to testcases/Makefile.am.

Signed-off-by: Kirill Makurin <maiddaisuki@outlook.com>
Signed-off-by: LIU Hao <lh_mouse@126.com>
2 files changed