Skip to content

Fix duplicate OCR test declarations in tests - #15

Closed
etherlink-intern wants to merge 1 commit into
mainfrom
codex/fix-ci-errors
Closed

etherlink-intern wants to merge 1 commit into
mainfrom
codex/fix-ci-errors

Conversation

@etherlink-intern

Copy link
Copy Markdown
Owner

Motivation

  • Duplicate Vision OCR test blocks and helper definitions in the test file caused Swift Testing macro redeclaration and conditional compilation mismatches, which broke swift test on CI.
  • The conditional compilation branches needed to be consolidated so only one Vision-enabled path and one fallback path exist.

Description

  • Removed the duplicated Vision-enabled test block in Tests/SwiftMarkItDownTests/SwiftMarkItDownTests.swift so the test is declared only once.
  • Removed the duplicated OCR helper definitions (OCRSample, renderedOCRSamples, renderOCRImage) and left a single helper implementation behind a balanced #if ... #endif guard.
  • Ensured conditional compilation blocks are balanced to avoid #else/#endif and macro redeclaration errors during test macro expansion.

Testing

  • Ran swift test and all tests passed (10 tests executed and passed).
  • Ran Scripts/smoke-test.sh and it completed successfully.

Codex Task

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