LCOV - app.info - js/src/jsapi-tests/testOOM.cpp

LCOV - code coverage report
| Current view: | directory - js/src/jsapi-tests - testOOM.cpp (source / functions) |  | Found | Hit | Coverage |
| Test: | app.info | Lines: | 12 | 12 | 100.0 %
| Date: | 2012-04-07 | Functions: | 9 | 7 | 77.8 %

           1                 : #include "tests.h"
           2                 :
           3               4 : BEGIN_TEST(testOOM)
           4                 : {
           5               1 :     JSString *jsstr = JS_ValueToString(cx, INT_TO_JSVAL(9));
           6               1 :     jsval tmp = STRING_TO_JSVAL(jsstr);
           7               1 :     JS_SetProperty(cx, global, "rootme", &tmp);
           8               1 :     const jschar *s = JS_GetStringCharsZ(cx, jsstr);
           9               1 :     JS_ASSERT(s[0] == '9' && s[1] == '\0');
          10               1 :     return true;
          11                 : }
          12                 :
          13               1 : virtual JSRuntime * createRuntime()
          14                 : {
          15               1 :     JSRuntime *rt = JS_NewRuntime(0);
          16               1 :     JS_SetGCParameter(rt, JSGC_MAX_BYTES, (uint32_t)-1);
          17               1 :     return rt;
          18                 : }
          19               2 : END_TEST(testOOM)

Generated by: LCOV version 1.7