test/hotspot/gtest/classfile/test_symbolTable.cpp
changeset 51262 d4b9a434af84
parent 51179 516acf6956a2
child 51406 f4b4dfac45b1
equal deleted inserted replaced
51261:0a4916c1418c 51262:d4b9a434af84
   123 
   123 
   124     Thread* THREAD = Thread::current();
   124     Thread* THREAD = Thread::current();
   125 
   125 
   126     // Find a symbol where there will probably be only one instance.
   126     // Find a symbol where there will probably be only one instance.
   127     for (int i = 0; i < 100; i++) {
   127     for (int i = 0; i < 100; i++) {
   128        snprintf(symbol_name, SYM_NAME_LENGTH, "some_symbol%d", i);
   128        os::snprintf(symbol_name, SYM_NAME_LENGTH, "some_symbol%d", i);
   129        TempNewSymbol ts = SymbolTable::new_symbol(symbol_name, CATCH);
   129        TempNewSymbol ts = SymbolTable::new_symbol(symbol_name, CATCH);
   130        if (ts->refcount() == 1) {
   130        if (ts->refcount() == 1) {
   131          EXPECT_TRUE(ts->refcount() == 1) << "Symbol is just created";
   131          EXPECT_TRUE(ts->refcount() == 1) << "Symbol is just created";
   132          break;  // found a unique symbol
   132          break;  // found a unique symbol
   133        }
   133        }