about summary refs log tree commit diff
path: root/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-01-11 11:17:22 +0000
committerbors <bors@rust-lang.org>2023-01-11 11:17:22 +0000
commitb22c152958eade17a71d899b29a2d39bcc77aa48 (patch)
treeec6da75dc598a0a4086c0cc032c86d7241be1bc1 /src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
parent8ecaad85f61375b18e1667b51a3ef350121d2ca0 (diff)
parent40ba0e84d53f605ccf01836e9c2d27892728ae81 (diff)
downloadrust-b22c152958eade17a71d899b29a2d39bcc77aa48.tar.gz
rust-b22c152958eade17a71d899b29a2d39bcc77aa48.zip
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
Move src/test to the root

See MCP at rust-lang/compiler-team#573

There may be more changes needed.

The first commit is just the move of the files:
You can check that the first commit did not do anything else than renames by running
```
git diff --diff-filter=r -M100% <rust-lang remote>/master <first commit hash>
```
The output should be empty, because the filter excludes renames, and the match threshold for qualifying a rename is 100%.

The second one is mostly a "find and replace" of `src/test` to `tests` and whatever is needed to make CI pass.

What is left to do:
---

- [x] Move directory
- [ ] Change references to `src/test`
    - [x] Change references in-tree
    - [ ] Change references in submodules / out-of-tree docs
- [x] Make CI pass:
    - [x] Fix tidy
    - [x] Fix tests
    - [x] Bless tests if needed (shouldn't normally)
- [ ] Merge it !
Diffstat (limited to 'src/test/debuginfo/generic-enum-with-different-disr-sizes.rs')
-rw-r--r--src/test/debuginfo/generic-enum-with-different-disr-sizes.rs92
1 files changed, 0 insertions, 92 deletions
diff --git a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
deleted file mode 100644
index adcb04da30d..00000000000
--- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs
+++ /dev/null
@@ -1,92 +0,0 @@
-// ignore-lldb: FIXME(#27089)
-// min-lldb-version: 310
-
-// Require a gdb that can read DW_TAG_variant_part.
-// min-gdb-version: 8.2
-
-// compile-flags:-g
-
-// === GDB TESTS ===================================================================================
-// gdb-command:run
-
-// gdb-command:print eight_bytes1
-// gdbr-check:$1 = generic_enum_with_different_disr_sizes::Enum<f64>::Variant1(100)
-
-// gdb-command:print four_bytes1
-// gdbr-check:$2 = generic_enum_with_different_disr_sizes::Enum<i32>::Variant1(101)
-
-// gdb-command:print two_bytes1
-// gdbr-check:$3 = generic_enum_with_different_disr_sizes::Enum<i16>::Variant1(102)
-
-// gdb-command:print one_byte1
-// gdbr-check:$4 = generic_enum_with_different_disr_sizes::Enum<u8>::Variant1(65)
-
-
-// gdb-command:print eight_bytes2
-// gdbr-check:$5 = generic_enum_with_different_disr_sizes::Enum<f64>::Variant2(100)
-
-// gdb-command:print four_bytes2
-// gdbr-check:$6 = generic_enum_with_different_disr_sizes::Enum<i32>::Variant2(101)
-
-// gdb-command:print two_bytes2
-// gdbr-check:$7 = generic_enum_with_different_disr_sizes::Enum<i16>::Variant2(102)
-
-// gdb-command:print one_byte2
-// gdbr-check:$8 = generic_enum_with_different_disr_sizes::Enum<u8>::Variant2(65)
-
-// gdb-command:continue
-
-// === LLDB TESTS ==================================================================================
-// lldb-command:run
-
-// lldb-command:print eight_bytes1
-// lldb-check:[...]$0 = Variant1(100)
-// lldb-command:print four_bytes1
-// lldb-check:[...]$1 = Variant1(101)
-// lldb-command:print two_bytes1
-// lldb-check:[...]$2 = Variant1(102)
-// lldb-command:print one_byte1
-// lldb-check:[...]$3 = Variant1('A')
-
-// lldb-command:print eight_bytes2
-// lldb-check:[...]$4 = Variant2(100)
-// lldb-command:print four_bytes2
-// lldb-check:[...]$5 = Variant2(101)
-// lldb-command:print two_bytes2
-// lldb-check:[...]$6 = Variant2(102)
-// lldb-command:print one_byte2
-// lldb-check:[...]$7 = Variant2('A')
-
-// lldb-command:continue
-
-#![allow(unused_variables)]
-#![allow(dead_code)]
-#![feature(omit_gdb_pretty_printer_section)]
-#![omit_gdb_pretty_printer_section]
-
-// This test case makes sure that we get correct type descriptions for the enum
-// discriminant of different instantiations of the same generic enum type where,
-// dependending on the generic type parameter(s), the discriminant has a
-// different size in memory.
-
-enum Enum<T> {
-    Variant1(T),
-    Variant2(T)
-}
-
-fn main() {
-    // These are ordered for descending size on purpose
-    let eight_bytes1 = Enum::Variant1(100.0f64);
-    let four_bytes1 = Enum::Variant1(101i32);
-    let two_bytes1 = Enum::Variant1(102i16);
-    let one_byte1 = Enum::Variant1(65u8);
-
-    let eight_bytes2 = Enum::Variant2(100.0f64);
-    let four_bytes2 = Enum::Variant2(101i32);
-    let two_bytes2 = Enum::Variant2(102i16);
-    let one_byte2 = Enum::Variant2(65u8);
-
-    zzz(); // #break
-}
-
-fn zzz() { () }