Skip to content

Commit 3772c1e

Browse files
committed
Switch expected and actual in assert_eq!
The original XUnit was expected, actual, but we had actual, expected. http://junit.sourceforge.net/javadoc/org/junit/Assert.html#assertEquals%28double,%20double%29 With the new formatting, this doesn't matter as much, but it's nice to be consistent with previous frameworks, and if we change the output such that it does matter, better to be ready.
1 parent 9bfe296 commit 3772c1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libsyntax/ext/expand.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ pub fn core_macros() -> ~str {
467467
)
468468

469469
macro_rules! assert_eq (
470-
($given:expr , $expected:expr) => (
470+
($expected:expr , $given:expr) => (
471471
{
472472
let given_val = $given;
473473
let expected_val = $expected;
@@ -480,7 +480,7 @@ pub fn core_macros() -> ~str {
480480
)
481481

482482
macro_rules! assert_approx_eq (
483-
($given:expr , $expected:expr) => (
483+
($expected:expr , $given:expr) => (
484484
{
485485
use std::cmp::ApproxEq;
486486

@@ -496,7 +496,7 @@ pub fn core_macros() -> ~str {
496496
}
497497
}
498498
);
499-
($given:expr , $expected:expr , $epsilon:expr) => (
499+
($expected:expr , $given:expr , $epsilon:expr) => (
500500
{
501501
use std::cmp::ApproxEq;
502502

0 commit comments

Comments
 (0)