This patch fixes the following portability issues in the tests.
Issue 1. Some tests use entitites defined in the standard header files, but do not include these headers directly. As a result, these tests do not compile under some conformant implementations.
Issue 2. Types wctrans_t and wctype_t are required to be scalar (ISO/IEC 9899:1999, section 7.25.1). Type std::ios_base::fmtflags is required to be bitmask (see standard requirement). Neither of these types is required to be integer, and therefore can be implemented, for example, as enum. As a result, any assignment of an integer value to variables of these types without an explicit cast does not compile under some conformant implementations.