TestService macro parser replaces all occurrences of macros regardless of context, causing syntax errors

As of version 0.653 (likely earlier), the parser for TestService’s macros (RBX_CHECK, RBX_MESSAGE etc) appears to replace every occurence of them regardless of where they’re placed, and as a result causes syntax errors in code that would normally be valid (comments, strings, variable names etc). These errors are not caught by the linter or debugger, making it difficult to figure out what’s causing them.

--all lines produce syntax errors with "Expected '('"
--RBX_CHECK
local _ = RBX_CHECK
local _ = 'RBX_CHECK'
local _ = ({}).RBX_CHECK

image

Place file: testServiceMacroTest.rbxl (54.0 KB)

Expected behavior

The parser ignores macros placed in areas in which replacing them would cause a syntax error.

1 Like

Thanks for the report! We’ll follow up when we have an update for you.

Thanks for the report. This feature is no longer supported and we recommend finding an alternative. There are other unit testing frameworks for Roblox you can search for.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.