Skip to content

Reorganize StrataTest/Languages/Core/ into Examples/ and Tests/#522

Merged
shigoel merged 2 commits intomainfrom
shilpi/core-tests-vs-examples
Mar 6, 2026
Merged

Reorganize StrataTest/Languages/Core/ into Examples/ and Tests/#522
shigoel merged 2 commits intomainfrom
shilpi/core-tests-vs-examples

Conversation

@shigoel
Copy link
Contributor

@shigoel shigoel commented Mar 5, 2026

Summary

  • Moves all files that were directly under StrataTest/Languages/Core/ into a new Core/Tests/ subdirectory
  • Moves behavior/regression-focused files from Core/Examples/ into Core/Tests/ (e.g. DatatypeTypingTests, IfElsePrecedenceTest, PrecedenceCheck, etc.)
  • Leaves feature showcase files in Core/Examples/ (e.g. Min, Map, SimpleProc, Loops, FreeRequireEnsure, UnreachableAssert, etc.)
  • No code changes — renames only; StrataTest uses globs = ["StrataTest.+"] so all files are auto-discovered

🤖 Generated with Claude Code

Move all files from Core/ directly and behavior-focused files from Core/Examples/
into a new Core/Tests/ directory. Feature showcase files remain in Core/Examples/.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shigoel shigoel requested a review from a team March 5, 2026 22:15
@shigoel shigoel enabled auto-merge March 5, 2026 22:15
Copy link
Contributor

@joscoh joscoh left a comment

Choose a reason for hiding this comment

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

Arguably PolymorphicDatatypeTest.lean, PolymorphicFunctionTest.lean, and RecursiveFunctionTests.lean could go in the Examples/ directory since they demonstrate how to use polymorphic functions, datatypes, and recursive functions, respectively. But they consist of several examples (unlike most in the Examples/ directory) and some parts are unit-test-like, so it's probably fine.

@shigoel
Copy link
Contributor Author

shigoel commented Mar 5, 2026

Arguably PolymorphicDatatypeTest.lean, PolymorphicFunctionTest.lean, and RecursiveFunctionTests.lean could go in the Examples/ directory since they demonstrate how to use polymorphic functions, datatypes, and recursive functions, respectively. But they consist of several examples (unlike most in the Examples/ directory) and some parts are unit-test-like, so it's probably fine.

Indeed -- I thought those were noisy and not showcase-y enough for Examples/. We should probably add good representative examples in the Examples/ directory, and I'm hoping this separation will help us exercise judgement there.

Copy link
Contributor

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

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

The file path for unit tests now contains 3 times the word Test. Reminds me of Dafny which had Tests/LitTests/LitTest .
I don't have a better alternative as I do like to see in my IDE that a file ends with Test as the path is not visible.

@shigoel shigoel added this pull request to the merge queue Mar 5, 2026
Merged via the queue into main with commit 823c6e2 Mar 6, 2026
15 checks passed
@shigoel shigoel deleted the shilpi/core-tests-vs-examples branch March 6, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants