ReactOS  0.4.14-dev-552-g2fad488
num_facets_test.cpp File Reference
#include "locale_test.h"
#include <locale>
#include <sstream>
#include <stdexcept>
#include "complete_digits.h"
Include dependency graph for num_facets_test.cpp:

Go to the source code of this file.

Classes

struct  ref_locale
 

Typedefs

typedef void(LocaleTest::* _Test) (const locale &, const ref_locale *)
 

Functions

static void test_supported_locale (LocaleTest &inst, _Test __test)
 

Variables

static const ref_locale tested_locales []
 

Typedef Documentation

◆ _Test

typedef void(LocaleTest::* _Test) (const locale &, const ref_locale *)

Definition at line 131 of file num_facets_test.cpp.

Function Documentation

◆ test_supported_locale()

static void test_supported_locale ( LocaleTest inst,
_Test  __test 
)
static

Definition at line 132 of file num_facets_test.cpp.

132  {
133  size_t n = sizeof(tested_locales) / sizeof(tested_locales[0]);
134  for (size_t i = 0; i < n; ++i) {
135  locale loc;
136 # if !defined (STLPORT) || defined (_STLP_USE_EXCEPTIONS)
137  try
138 # endif
139  {
140  locale tmp(tested_locales[i].name);
141  loc = tmp;
142  }
143 # if !defined (STLPORT) || defined (_STLP_USE_EXCEPTIONS)
144  catch (runtime_error const&) {
145  //This locale is not supported.
146  continue;
147  }
148 # endif
149  CPPUNIT_MESSAGE( loc.name().c_str() );
150  (inst.*__test)(loc, tested_locales + i);
151 
152  {
153  locale tmp(locale::classic(), tested_locales[i].name, locale::numeric);
154  loc = tmp;
155  }
156  (inst.*__test)(loc, tested_locales + i);
157 
158  {
160  loc = tmp;
161  }
162  (inst.*__test)(loc, tested_locales + i);
163  }
164 }
GLdouble n
Definition: glext.h:7729
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
Definition: _locale.h:75
static const locale &_STLP_CALL classic()
Definition: locale.cpp:404
static const ref_locale tested_locales[]
string name() const
Definition: locale.cpp:388
Definition: name.c:38
#define CPPUNIT_MESSAGE(m)
Definition: cppunit_mini.h:223

Referenced by LocaleTest::num_put_get().

Variable Documentation

◆ tested_locales

const ref_locale tested_locales[]
static
Initial value:
= {
{ "fr_FR", ",", "\xa0"},
{ "ru_RU.koi8r", ",", "."},
{ "en_GB", ".", ","},
{ "en_US", ".", ","},
{ "C", ".", ","},
}

Definition at line 20 of file num_facets_test.cpp.

Referenced by test_supported_locale().