Skip to content

Commit

Permalink
rename some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wackbyte committed Oct 3, 2022
1 parent 945c6a3 commit 83825c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions rspirv/binary/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,11 @@ mod tests {
}

#[test]
fn test_decode_int64() {
let b = [0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef];
fn test_decode_int32() {
let b = [0x12, 0x34, 0x56, 0x78];
let mut d = Decoder::new(&b);
assert_eq!(Ok(0xefcdab9078563412), d.int64());
}
assert_eq!(Ok(0x78563412), d.int32());

#[test]
fn test_decode_float32() {
let b = [0x14, 0xAE, 0x29, 0x42];
let mut d = Decoder::new(&b);
assert_eq!(Ok(42.42f32.to_bits()), d.int32());
Expand All @@ -399,7 +396,11 @@ mod tests {
}

#[test]
fn test_decode_float64() {
fn test_decode_int64() {
let b = [0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef];
let mut d = Decoder::new(&b);
assert_eq!(Ok(0xefcdab9078563412), d.int64());

let b = [0xF6, 0x28, 0x5C, 0x8F, 0xC2, 0x35, 0x45, 0x40];
let mut d = Decoder::new(&b);
assert_eq!(Ok(42.42f64.to_bits()), d.int64());
Expand Down
4 changes: 2 additions & 2 deletions rspirv/dr/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ mod tests {
}

#[test]
fn test_constant_f32() {
fn test_constant_int32() {
let mut b = Builder::new();
let float = b.type_float(32);
// Normal numbers
Expand Down Expand Up @@ -1029,7 +1029,7 @@ mod tests {
}

#[test]
fn test_spec_constant_f32() {
fn test_spec_constant_int32() {
let mut b = Builder::new();
let float = b.type_float(32);
// Normal numbers
Expand Down

0 comments on commit 83825c0

Please sign in to comment.