Skip to content

More tests#20

Merged
gburgessiv merged 2 commits intomainfrom
more-test
Feb 27, 2026
Merged

More tests#20
gburgessiv merged 2 commits intomainfrom
more-test

Conversation

@gburgessiv
Copy link
Copy Markdown
Owner

I asked Claude to propose mostly-pure functions to add tests for. It had some good suggestions, some iffy. This PR contains the good suggestions.

I asked Claude to propose mostly-pure functions to add tests for. It had
some good suggestions, some iffy. This PR contains the good suggestions.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds additional unit tests around small, mostly-pure helper logic (email parsing, Lab buildbot categorization/email cleanup, Discord duration formatting, and calendar ping/refresh timing), and simplifies an internal sortedness assertion by using the standard library helper.

Changes:

  • Add targeted unit tests for Email::parse plus a test-only constructor to ease assertions.
  • Expand unit test coverage in lab.rs, discord.rs, and calendar_events.rs for string/time helpers.
  • Replace a custom is_sorted_by helper with slice::is_sorted_by.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
llvm_buildbot_monitor/src/main.rs Adds test-only Email::from_parts and a new email_tests module for Email::parse.
llvm_buildbot_monitor/src/lab.rs Adds helper builder() plus new unit tests for remove_name_from_email and determine_bot_category.
llvm_buildbot_monitor/src/greendragon.rs Removes custom sortedness helper; uses build_list.is_sorted_by(...) in debug assertion.
llvm_buildbot_monitor/src/discord.rs Adds unit tests covering boundary behavior of duration_to_shorthand.
llvm_buildbot_monitor/src/calendar_events.rs Adds unit tests for ping-time calculation and refresh scheduling edge cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread llvm_buildbot_monitor/src/lab.rs Outdated
@gburgessiv gburgessiv enabled auto-merge (squash) February 27, 2026 02:36
@gburgessiv gburgessiv merged commit 91c6f2a into main Feb 27, 2026
2 checks passed
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.

2 participants