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

             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 <config.h>
       6                 :             : 
       7                 :             : #include <glib-object.h>
       8                 :             : 
       9                 :             : #include "gjs/error-types.h"
      10                 :             : 
      11                 :             : // clang-format off
      12         [ +  + ]:          71 : G_DEFINE_QUARK(gjs-error-quark, gjs_error)
      13         [ +  + ]:          58 : G_DEFINE_QUARK(gjs-js-error-quark, gjs_js_error)
      14                 :             : // clang-format on
      15                 :             : 
      16                 :           4 : GType gjs_js_error_get_type(void) {
      17                 :             :     static const GEnumValue errors[] = {
      18                 :             :         {GJS_JS_ERROR_ERROR, "Error", "error"},
      19                 :             :         {GJS_JS_ERROR_EVAL_ERROR, "EvalError", "eval-error"},
      20                 :             :         {GJS_JS_ERROR_INTERNAL_ERROR, "InternalError", "internal-error"},
      21                 :             :         {GJS_JS_ERROR_RANGE_ERROR, "RangeError", "range-error"},
      22                 :             :         {GJS_JS_ERROR_REFERENCE_ERROR, "ReferenceError", "reference-error"},
      23                 :             :         {GJS_JS_ERROR_STOP_ITERATION, "StopIteration", "stop-iteration"},
      24                 :             :         {GJS_JS_ERROR_SYNTAX_ERROR, "SyntaxError", "syntax-error"},
      25                 :             :         {GJS_JS_ERROR_TYPE_ERROR, "TypeError", "type-error"},
      26                 :             :         {GJS_JS_ERROR_URI_ERROR, "URIError", "uri-error"},
      27                 :             :         {0, nullptr, nullptr}};
      28                 :             :     // Initialization of static local variable guaranteed only once in C++11
      29   [ +  +  +  - ]:           4 :     static GType g_type_id = g_enum_register_static("GjsJSError", errors);
      30                 :           4 :     return g_type_id;
      31                 :             : }
        

Generated by: LCOV version 2.0-1