diff options
| author | Corey Richardson <corey@octayn.net> | 2013-05-18 22:02:45 -0400 |
|---|---|---|
| committer | Corey Richardson <corey@octayn.net> | 2013-05-19 08:16:02 -0400 |
| commit | cc57ca012a1f49875e19b1b089c91928dc339979 (patch) | |
| tree | 9f10c27962dbb7c844bc3abb7e20119d75f02aa6 /src/librustpkg | |
| parent | 3acf37897a4ca7f019ed8894ec3878801377773d (diff) | |
| download | rust-cc57ca012a1f49875e19b1b089c91928dc339979.tar.gz rust-cc57ca012a1f49875e19b1b089c91928dc339979.zip | |
Use assert_eq! rather than assert! where possible
Diffstat (limited to 'src/librustpkg')
| -rw-r--r-- | src/librustpkg/tests.rs | 8 | ||||
| -rw-r--r-- | src/librustpkg/testsuite/pass/src/install-paths/test.rs | 2 | ||||
| -rw-r--r-- | src/librustpkg/util.rs | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/librustpkg/tests.rs b/src/librustpkg/tests.rs index 8eba3f06de3..2574ba4e762 100644 --- a/src/librustpkg/tests.rs +++ b/src/librustpkg/tests.rs @@ -212,7 +212,7 @@ fn test_package_ids_must_be_relative_path_like() { let whatever = PkgId::new("foo"); - assert!(addversion("foo") == whatever.to_str()); + assert_eq!(addversion("foo"), whatever.to_str()); assert!(addversion("github.com/mozilla/rust") == PkgId::new("github.com/mozilla/rust").to_str()); @@ -222,16 +222,16 @@ fn test_package_ids_must_be_relative_path_like() { copy whatever }).in { let x = PkgId::new(""); - assert!(addversion("foo") == x.to_str()); + assert_eq!(addversion("foo"), x.to_str()); } do cond.trap(|(p, e)| { - assert!(p.to_str() == os::make_absolute(&Path("foo/bar/quux")).to_str()); + assert_eq!(p.to_str(), os::make_absolute(&Path("foo/bar/quux")).to_str()); assert!("absolute pkgid" == e); copy whatever }).in { let z = PkgId::new(os::make_absolute(&Path("foo/bar/quux")).to_str()); - assert!(addversion("foo") == z.to_str()); + assert_eq!(addversion("foo"), z.to_str()); } } diff --git a/src/librustpkg/testsuite/pass/src/install-paths/test.rs b/src/librustpkg/testsuite/pass/src/install-paths/test.rs index acfae9e04fb..011a1540e1b 100644 --- a/src/librustpkg/testsuite/pass/src/install-paths/test.rs +++ b/src/librustpkg/testsuite/pass/src/install-paths/test.rs @@ -10,5 +10,5 @@ #[test] fn test_two_plus_two() { - assert!(2 + 2 == 4); + assert_eq!(2 + 2, 4); } diff --git a/src/librustpkg/util.rs b/src/librustpkg/util.rs index 4a9c276948a..108a404eb7c 100644 --- a/src/librustpkg/util.rs +++ b/src/librustpkg/util.rs @@ -417,7 +417,7 @@ pub fn compile_crate_from_input(input: &driver::input, match crate_opt { Some(c) => { debug!("Calling compile_rest, outputs = %?", outputs); - assert!(what == driver::cu_everything); + assert_eq!(what, driver::cu_everything); driver::compile_rest(sess, cfg, driver::cu_everything, Some(outputs), Some(c)); c } |
