code: def test_domain_cpp_ast_enum_definitions():
      check("enum", "{key}A", {2: "1A"})
      check("enum", "{key}A : std::underlying_type<B>::type", {2: "1A"})
      check("enum", "{key}A : unsigned int", {2: "1A"})
      check("enum", "public A", {2: "1A"}, output="{key}A")
      check("enum", "private {key}A", {2: "1A"})
  
      check("enumerator", "{key}A", {2: "1A"})
      check(
          "enumerator",
          "{key}A = std::numeric_limits<unsigned long>::max()",
          {2: "1A"},
      )
  
imports: import itertools
  import re
  import zlib
  import pytest
  import sphinx.domains.cpp
  from sphinx import addnodes
  from sphinx.addnodes import desc, desc_content, desc_name, desc_parameter, desc_parameterlist, desc_sig_name, desc_sig_space, desc_signature, desc_signature_line, pending_xref
  from sphinx.domains.cpp import DefinitionError, DefinitionParser, NoOldIdError, Symbol, _id_prefix, _max_id
  from sphinx.ext.intersphinx import load_mappings, normalize_intersphinx_mapping
  from sphinx.testing import restructuredtext
  from sphinx.testing.util import assert_node
  from sphinx.writers.text import STDINDENT
label_desc: Use image node_id 14 for calling a global function with example usage: test_domain_cpp_ast_enum_definitions() without return types