Skip to content

Updated nonnegative_int tests to use _n literals #1658

Open
khoang05 wants to merge 1 commit into
flexflow:masterfrom
khoang05:use-nonnegative-int-literals
Open

Updated nonnegative_int tests to use _n literals #1658
khoang05 wants to merge 1 commit into
flexflow:masterfrom
khoang05:use-nonnegative-int-literals

Conversation

@khoang05

@khoang05 khoang05 commented Jun 25, 2026

Copy link
Copy Markdown

…nsertions(+), 60

deletions(-)
khoang21@sapling2:/ff$ git push -u origin use-nonnegative-int-literals# Please enter the commit message for your changes. Lines starting Username for 'https://github.com': khoang05# with '#' will be ignored, and an empty message aborts the commit. Password for 'https://khoang05@github.com': # remote: Invalid username or token. Password authentication is not supported for Git operations.# On branch use-nonnegative-int-literals fatal: Authentication failed for 'https://github.com/flexflow/flexflow-train.git/'# Changes to be committed: khoang21@sapling2:/ff$ git remote -v# modified: lib/utils/test/src/utils/nonnegative_int/nonnegative_int.cc origin https://github.com/flexflow/flexflow-train.git (fetch)# origin https://github.com/flexflow/flexflow-train.git (push) khoang21@sapling2:/ff$ git remote set-url origin https://github.com/khoang05/flexflow-train.git khoang21@sapling2:/ff$ git push -u origin use-nonnegative-int-literals Username for 'https://github.com': khoang05 Password for 'https://khoang05@github.com':

Description of changes:

Related Issues:

Linked Issues:

  • Issue #

Issues closed by this PR:

  • Closes #

This change is Reviewable

…nsertions(+), 60

 deletions(-)
khoang21@sapling2:~/ff$ git push -u origin use-nonnegative-int-literals# Please enter the
commit message for your changes. Lines starting Username for 'https://github.com': khoang05#
with '#' will be ignored, and an empty message aborts the commit. Password for
'https://khoang05@github.com': # remote: Invalid username or token. Password authentication is
not supported for Git operations.# On branch use-nonnegative-int-literals fatal:
Authentication failed for 'https://github.com/flexflow/flexflow-train.git/'# Changes to be
committed: khoang21@sapling2:~/ff$ git remote -v# modified:
lib/utils/test/src/utils/nonnegative_int/nonnegative_int.cc origin
https://github.com/flexflow/flexflow-train.git (fetch)# origin
https://github.com/flexflow/flexflow-train.git (push) khoang21@sapling2:~/ff$ git remote
set-url origin https://github.com/khoang05/flexflow-train.git khoang21@sapling2:~/ff$ git push
-u origin use-nonnegative-int-literals Username for 'https://github.com': khoang05
Password for 'https://khoang05@github.com':
@elliottslaughter elliottslaughter self-requested a review June 25, 2026 23:15
Comment on lines 25 to 27
SUBCASE("LHS: nonnegative_int, RHS: nonnegative_int, equal") {
CHECK(nn_int_1a == nn_int_1b);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a good start, thanks!

There's an opportunity here to rewrite this, given that we can now do all of this inline (and this is what the positive_int test does):

Suggested change
SUBCASE("LHS: nonnegative_int, RHS: nonnegative_int, equal") {
CHECK(nn_int_1a == nn_int_1b);
}
CHECK(1_n == 1_n);

And so on. It's a bit tedious but I think the tests will read a lot cleaner after this.

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