Skip to content

Commit 3cae1d3

Browse files
committed
Add test for new uuid function, fix doctest.
1 parent e995020 commit 3cae1d3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/device.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ impl Device {
367367
/// # init(CudaFlags::empty())?;
368368
/// use rustacuda::device::Device;
369369
/// let device = Device::get_device(0)?;
370-
/// println!("Device UUID: {}", device.uuid()?);
370+
/// println!("Device UUID: {:?}", device.uuid()?);
371371
/// # Ok(())
372372
/// # }
373373
/// ```
@@ -481,4 +481,12 @@ mod test {
481481
CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX as u32
482482
);
483483
}
484+
485+
#[test]
486+
fn test_uuid() -> Result<(), Box<dyn Error>> {
487+
test_init()?;
488+
let uuid = Device::get_device(0)?.uuid()?;
489+
println!("{:?}", uuid);
490+
Ok(())
491+
}
484492
}

0 commit comments

Comments
 (0)