blob: 9c77868df60b7ddec054e8b70ecfc518d2336cb0 [file] [log] [blame]
# Copyright 2023-2024 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Test "ptype INTERNAL_FUNCTION" in all languages.
proc test_ptype_internal_function {} {
set all_languages [get_set_option_choices "set language"]
foreach_with_prefix lang $all_languages {
if { $lang == "auto" || $lang == "local" } {
# Avoid duplicate testing.
continue
}
gdb_test_no_output "set language $lang"
if {$lang == "unknown"} {
gdb_test "ptype \$_isvoid" \
"expression parsing not implemented for language \"Unknown\""
} else {
gdb_test "ptype \$_isvoid" "<internal function>"
}
}
}
clean_restart
test_ptype_internal_function