Skip to content
Snippets Groups Projects
  • Nadav Har'El's avatar
    cec23838
    locale: add test for C++ locale support · cec23838
    Nadav Har'El authored
    
    This test catches a few bugs we had in our C++ locale support (see
    issue #314). After the previous patches, this test will succeed.
    
    This test verifies that:
    
    1. Trying to use an unsupported locale (we only support "C") throws an
       exception, as required, rather than crashing as before.
    
    2. std::isspace(' ',std::locale) returns true, as it should (previously
       our ctype array was shifted by one, so this returned false!)
    
    3. istream's input operator (operator>>) should stop on a space.
       Previously, it didn't, because we didn't recognize the space.
    
    Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
    Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
    cec23838
    History
    locale: add test for C++ locale support
    Nadav Har'El authored
    
    This test catches a few bugs we had in our C++ locale support (see
    issue #314). After the previous patches, this test will succeed.
    
    This test verifies that:
    
    1. Trying to use an unsupported locale (we only support "C") throws an
       exception, as required, rather than crashing as before.
    
    2. std::isspace(' ',std::locale) returns true, as it should (previously
       our ctype array was shifted by one, so this returned false!)
    
    3. istream's input operator (operator>>) should stop on a space.
       Previously, it didn't, because we didn't recognize the space.
    
    Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
    Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>