Skip to content

Conversation

MihaiCristianCondrea
Copy link
Owner

Summary

  • add unit tests for CodeHighlighter Java and XML themes

Testing

  • ./gradlew test (fails: SDK location not found)

https://chatgpt.com/codex/tasks/task_e_68c66badab44832db474f59d6cf1bd5a

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

return null;
}).when(codeView).addSyntaxPattern(any(Pattern.class), anyInt());

CodeHighlighter.applyJavaTheme(codeView);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Guard unit tests against Android Color dependency

Running CodeHighlighter.applyJavaTheme(codeView) in a local unit test invokes android.graphics.Color.parseColor, but the project’s test configuration only includes plain JUnit/Mockito and no Robolectric or Android runtime stubs. When ./gradlew test executes, this call will throw RuntimeException: Method parseColor in android.graphics.Color not mocked before any assertions run (same for applyXmlTheme later in the file), causing the entire test task to fail. Consider moving these tests under androidTest, adding Robolectric, or mocking the color parsing so the tests can execute in a JVM environment.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant