< prev index next >

src/hotspot/share/utilities/internalVMTests.cpp

Print this page
rev 52215 : [mq]: 8177708


  25 #include "precompiled.hpp"
  26 
  27 #ifndef PRODUCT
  28 #include <locale.h>
  29 
  30 #include "utilities/internalVMTests.hpp"
  31 #include "utilities/macros.hpp"
  32 #include "utilities/ostream.hpp"
  33 
  34 #define run_unit_test(unit_test_function_call)                \
  35   void unit_test_function_call();                             \
  36   run_test(#unit_test_function_call, unit_test_function_call);
  37 
  38 void InternalVMTests::run_test(const char* name, void (*test)()) {
  39   tty->print_cr("Running test: %s", name);
  40   test();
  41 }
  42 
  43 void InternalVMTests::run() {
  44   tty->print_cr("Running internal VM tests");
  45   run_unit_test(TestReserveMemorySpecial_test);
  46   run_unit_test(TestMetaspaceUtils_test);
  47   run_unit_test(GCTimer_test);
  48   // These tests require the "C" locale to correctly parse decimal values
  49   const char* orig_locale = setlocale(LC_NUMERIC, NULL);
  50   setlocale(LC_NUMERIC, "C");
  51   run_unit_test(DirectivesParser_test);
  52   setlocale(LC_NUMERIC, orig_locale);
  53   tty->print_cr("All internal VM tests passed");
  54 }
  55 
  56 #endif


  25 #include "precompiled.hpp"
  26 
  27 #ifndef PRODUCT
  28 #include <locale.h>
  29 
  30 #include "utilities/internalVMTests.hpp"
  31 #include "utilities/macros.hpp"
  32 #include "utilities/ostream.hpp"
  33 
  34 #define run_unit_test(unit_test_function_call)                \
  35   void unit_test_function_call();                             \
  36   run_test(#unit_test_function_call, unit_test_function_call);
  37 
  38 void InternalVMTests::run_test(const char* name, void (*test)()) {
  39   tty->print_cr("Running test: %s", name);
  40   test();
  41 }
  42 
  43 void InternalVMTests::run() {
  44   tty->print_cr("Running internal VM tests");

  45   run_unit_test(TestMetaspaceUtils_test);
  46   run_unit_test(GCTimer_test);
  47   // These tests require the "C" locale to correctly parse decimal values
  48   const char* orig_locale = setlocale(LC_NUMERIC, NULL);
  49   setlocale(LC_NUMERIC, "C");
  50   run_unit_test(DirectivesParser_test);
  51   setlocale(LC_NUMERIC, orig_locale);
  52   tty->print_cr("All internal VM tests passed");
  53 }
  54 
  55 #endif
< prev index next >