Skip to content

Fix usage of symbols_get_description in symbols.c tests #581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix usage of symbols_get_description in symbols.c tests
dd27f99 added a desc_size parameter to
symbols_get_description; this updates the (possibly unused?) symbols
test main to supply it.
  • Loading branch information
doismellburning committed Jul 18, 2025
commit f636442a3f17516aeddc25b31aad3371fb3bfbc6
12 changes: 6 additions & 6 deletions src/symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,25 +1041,25 @@ int main (int argc, char *argv[])



symbols_get_description ('J', 's', description);
symbols_get_description ('J', 's', description, strlen(description));
if (strcmp(description, "Jet Ski") != 0) dw_printf ("ERROR 3-1\n");

symbols_get_description ('/', 'O', description);
symbols_get_description ('/', 'O', description, strlen(description));
if (strcmp(description, "BALLOON") != 0) dw_printf ("ERROR 3-2\n");

symbols_get_description ('\\', 'T', description);
symbols_get_description ('\\', 'T', description, strlen(description));
if (strcmp(description, "Thunderstorm") != 0) dw_printf ("ERROR 3-3\n");

symbols_get_description ('5', 'T', description);
symbols_get_description ('5', 'T', description, strlen(description));
if (strcmp(description, "Thunderstorm w/overlay 5") != 0) dw_printf ("ERROR 3-4\n");

// Expect to see this:
// Symbol table identifier is not '/' (primary), '\' (alternate), or valid overlay character.

symbols_get_description (' ', 'T', description);
symbols_get_description (' ', 'T', description, strlen(description));
if (strcmp(description, "--no-symbol--") != 0) dw_printf ("ERROR 3-5\n");

symbols_get_description ('/', ' ', description);
symbols_get_description ('/', ' ', description, strlen(description));
if (strcmp(description, "--no-symbol--") != 0) dw_printf ("ERROR 3-6\n");


Expand Down