From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Eric Wong <e@80x24.org>
Cc: meta@public-inbox.org, "Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 4/4] t/v2reindex.t: Swap the order of minmax tests so errors make sense
Date: Tue, 17 Jul 2018 19:32:01 -0500 [thread overview]
Message-ID: <20180718003201.31740-4-ebiederm@xmission.com> (raw)
In-Reply-To: <87sh4hidvg.fsf@xmission.com>
Previously if a minmax test failed it would say it was expecting the
incorrect value, which is confusing when looking into why the test
fails.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
t/v2reindex.t | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/v2reindex.t b/t/v2reindex.t
index 5bc307f1cac1..8af30991f858 100644
--- a/t/v2reindex.t
+++ b/t/v2reindex.t
@@ -63,7 +63,7 @@ $im->done;
ok(-d $xap, 'Xapian directories recreated');
delete $ibx->{mm};
-is_deeply($minmax, [ $ibx->mm->minmax ], 'minmax unchanged');
+is_deeply([ $ibx->mm->minmax ], $minmax, 'minmax unchanged');
ok(unlink "$mainrepo/msgmap.sqlite3", 'remove msgmap');
remove_tree($xap);
@@ -77,7 +77,7 @@ ok(!-d $xap, 'Xapian directories removed again');
$im->done;
ok(-d $xap, 'Xapian directories recreated');
delete $ibx->{mm};
- is_deeply($minmax, [ $ibx->mm->minmax ], 'minmax unchanged');
+ is_deeply([ $ibx->mm->minmax ], $minmax, 'minmax unchanged');
}
ok(unlink "$mainrepo/msgmap.sqlite3", 'remove msgmap');
@@ -92,7 +92,7 @@ ok(!-d $xap, 'Xapian directories removed again');
$im->done;
ok(-d $xap, 'Xapian directories recreated');
delete $ibx->{mm};
- is_deeply($minmax, [ $ibx->mm->minmax ], 'minmax unchanged');
+ is_deeply([ $ibx->mm->minmax ], $minmax, 'minmax unchanged');
}
done_testing();
--
2.17.1
next prev parent reply other threads:[~2018-07-18 0:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 0:30 [PATCH 0/4] minor test cleanups Eric W. Biederman
2018-07-18 0:31 ` [PATCH 1/4] t/v2reindex.t: Ensure the numbers 1 to 10 are used Eric W. Biederman
2018-07-18 0:31 ` [PATCH 2/4] t/search.t t/v2writable.t: Teach search tests to fail more cleanly Eric W. Biederman
2018-07-18 0:32 ` [PATCH 3/4] t/v2reindex.t: Don't reuse $ibx as two different kinds of variable Eric W. Biederman
2018-07-18 0:32 ` Eric W. Biederman [this message]
2018-07-18 10:30 ` [PATCH 0/4] minor test cleanups Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180718003201.31740-4-ebiederm@xmission.com \
--to=ebiederm@xmission.com \
--cc=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).