LCOV - code coverage report
Current view: top level - gjs - error-types.cpp (source / functions) Hit Total Coverage
Test: gjs- Code Coverage Lines: 5 5 100.0 %
Date: 2024-02-27 17:05:05 Functions: 3 3 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 7 8 87.5 %

           Branch data     Line data    Source code
       1                 :            : /* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
       2                 :            : // SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
       3                 :            : // SPDX-FileCopyrightText: 2008 litl, LLC
       4                 :            : 
       5                 :            : #include <glib-object.h>
       6                 :            : 
       7                 :            : #include "gjs/error-types.h"
       8                 :            : 
       9                 :            : // clang-format off
      10         [ +  + ]:         71 : G_DEFINE_QUARK(gjs-error-quark, gjs_error)
      11         [ +  + ]:         65 : G_DEFINE_QUARK(gjs-js-error-quark, gjs_js_error)
      12                 :            : // clang-format on
      13                 :            : 
      14                 :          4 : GType gjs_js_error_get_type(void) {
      15                 :            :     static const GEnumValue errors[] = {
      16                 :            :         {GJS_JS_ERROR_ERROR, "Error", "error"},
      17                 :            :         {GJS_JS_ERROR_EVAL_ERROR, "EvalError", "eval-error"},
      18                 :            :         {GJS_JS_ERROR_INTERNAL_ERROR, "InternalError", "internal-error"},
      19                 :            :         {GJS_JS_ERROR_RANGE_ERROR, "RangeError", "range-error"},
      20                 :            :         {GJS_JS_ERROR_REFERENCE_ERROR, "ReferenceError", "reference-error"},
      21                 :            :         {GJS_JS_ERROR_STOP_ITERATION, "StopIteration", "stop-iteration"},
      22                 :            :         {GJS_JS_ERROR_SYNTAX_ERROR, "SyntaxError", "syntax-error"},
      23                 :            :         {GJS_JS_ERROR_TYPE_ERROR, "TypeError", "type-error"},
      24                 :            :         {GJS_JS_ERROR_URI_ERROR, "URIError", "uri-error"},
      25                 :            :         {0, nullptr, nullptr}};
      26                 :            :     // Initialization of static local variable guaranteed only once in C++11
      27   [ +  +  +  - ]:          4 :     static GType g_type_id = g_enum_register_static("GjsJSError", errors);
      28                 :          4 :     return g_type_id;
      29                 :            : }

Generated by: LCOV version 1.14