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

LCOV - code coverage report
| Current view: | directory - js/src/jsapi-tests - testStringBuffer.cpp (source / functions) |  | Found | Hit | Coverage |
| Test: | app.info | Lines: | 12 | 12 | 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                 : #include "jsatom.h"
           8                 :
           9                 : #include "vm/StringBuffer.h"
          10                 :
          11                 : #include "jsobjinlines.h"
          12                 :
          13               4 : BEGIN_TEST(testStringBuffer_finishString)
          14                 : {
          15               1 :     JSString *str = JS_NewStringCopyZ(cx, "foopy");
          16               1 :     CHECK(str);
          17                 :
          18               1 :     JSAtom *atom = js_AtomizeString(cx, str);
          19               1 :     CHECK(atom);
          20                 :
          21               2 :     js::StringBuffer buffer(cx);
          22               1 :     CHECK(buffer.append("foopy"));
          23                 :
          24               1 :     JSAtom *finishedAtom = buffer.finishAtom();
          25               1 :     CHECK(finishedAtom);
          26               1 :     CHECK_EQUAL(atom, finishedAtom);
          27               1 :     return true;
          28                 : }
          29               2 : END_TEST(testStringBuffer_finishString)

Generated by: LCOV version 1.7