Closed petr-tik closed 6 years ago
Looks like a regression in tests - one of the lines from rust src is repeated.
Also, push, mov and pop instructions are missing where expected
push
mov
pop
$$$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04 LTS Release: 18.04 Codename: bionic $$$ rustc -V rustc 1.29.0-nightly (12ed235ad 2018-07-18) $$$ cargo -V cargo 1.29.0-nightly (af9e40c26 2018-07-05)
stdout after running the test command below
---- inherent_method stdout ---- thread 'inherent_method' panicked at 'CLI assertion failed: `cargo run --bin cargo-asm -- asm --manifest-path cargo-asm-test/lib_crate --no-color --debug-info lib_crate::baz::Foo::foo_add --rust` StdOut mismatch: diff: pub fn foo_add(&self) -> usize { - push rbp mov rbp, rsp self.x + self.y mov rax, qword, ptr, [rdi, +, 8] + self.x + self.y add rax, qword, ptr, [rdi] } - pop rbp ret
cargo test inherent
#[test] fn inherent_method() { let expected = if cfg!(target_os = "macos") || cfg!(target_os = "linux") { r#" pub fn foo_add(&self) -> usize { self.x + self.y mov rax, qword, ptr, [rdi, +, 8] add rax, qword, ptr, [rdi] } ret
This is probably because you are not using rustc 1.25.0 which is what the tests expect.
If this test fails with Rust 1.25.0 let me know and I'll reopen.
Problem description
Looks like a regression in tests - one of the lines from rust src is repeated.
Also,
push
,mov
andpop
instructions are missing where expectedInfo on system
Stacktrace
stdout after running the test command below
Steps to reproduce
Desired outcome in tests/cli.rs