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

LCOV - code coverage report
| Current view: | directory - js/src/jsapi-tests - testDefineProperty.cpp (source / functions) |  | Found | Hit | Coverage |
| Test: | app.info | Lines: | 8 | 8 | 100.0 %
| Date: | 2012-04-07 | Functions: | 8 | 6 | 75.0 %

           1                 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
           2                 :  * vim: set ts=8 sw=4 et tw=99:
           3                 :  */
           4                 :
           5                 : #include "tests.h"
           6                 :
           7               4 : BEGIN_TEST(testDefineProperty_bug564344)
           8                 : {
           9               2 :     jsvalRoot x(cx);
          10               1 :     EVAL("function f() {}\n"
          11                 :          "var x = {p: f};\n"
          12                 :          "x.p();  // brand x's scope\n"
          13                 :          "x;", x.addr());
          14                 :
          15               1 :     JSObject *obj = JSVAL_TO_OBJECT(x.value());
          16               3 :     for (int i = 0; i < 2; i++)
          17               2 :         CHECK(JS_DefineProperty(cx, obj, "q", JSVAL_VOID, NULL, NULL, JSPROP_SHARED));
          18               1 :     return true;
          19                 : }
          20               2 : END_TEST(testDefineProperty_bug564344)

Generated by: LCOV version 1.7