Mercurial > hg > truffle
diff src/share/vm/oops/klass.cpp @ 14492:7f0e0366ec81
8035746: Add missing Klass::oop_is_instanceClassLoader() function
Reviewed-by: mgerdin, coleenp
author | stefank |
---|---|
date | Thu, 27 Feb 2014 10:36:50 +0100 |
parents | 48314d596a04 |
children | d8041d695d19 |
line wrap: on
line diff
--- a/src/share/vm/oops/klass.cpp Thu Feb 27 10:34:55 2014 +0100 +++ b/src/share/vm/oops/klass.cpp Thu Feb 27 10:36:50 2014 +0100 @@ -692,3 +692,21 @@ } #endif + +/////////////// Unit tests /////////////// + +#ifndef PRODUCT + +class TestKlass { + public: + static void test_oop_is_instanceClassLoader() { + assert(SystemDictionary::ClassLoader_klass()->oop_is_instanceClassLoader(), "assert"); + assert(!SystemDictionary::String_klass()->oop_is_instanceClassLoader(), "assert"); + } +}; + +void TestKlass_test() { + TestKlass::test_oop_is_instanceClassLoader(); +} + +#endif