sysaudio: skip most tests
until we find a better way to test sysaudio via CI a usable device may not be in the first index
This commit is contained in:
parent
728582c75e
commit
fe9ec5ba15
1 changed files with 32 additions and 20 deletions
|
|
@ -68,41 +68,53 @@ test "list devices" {
|
|||
}
|
||||
|
||||
test "connect to device" {
|
||||
const a = try init();
|
||||
defer a.deinit();
|
||||
return error.SkipZigTest;
|
||||
|
||||
const d = try a.requestDevice(std.testing.allocator, .{ .mode = .output });
|
||||
defer d.deinit(std.testing.allocator);
|
||||
// const a = try init();
|
||||
// defer a.deinit();
|
||||
|
||||
// const d = try a.requestDevice(std.testing.allocator, .{ .mode = .output });
|
||||
// defer d.deinit(std.testing.allocator);
|
||||
}
|
||||
|
||||
test "connect to device from descriptor" {
|
||||
const a = try init();
|
||||
defer a.deinit();
|
||||
return error.SkipZigTest;
|
||||
|
||||
var iter = a.outputDeviceIterator();
|
||||
var device_conf = (try iter.next()) orelse return error.NoDeviceFound;
|
||||
// const a = try init();
|
||||
// defer a.deinit();
|
||||
|
||||
const d = try a.requestDevice(std.testing.allocator, device_conf);
|
||||
defer d.deinit(std.testing.allocator);
|
||||
// var iter = a.outputDeviceIterator();
|
||||
// while (try iter.next()) |desc| {
|
||||
// if (mem.eql(u8, desc.name orelse "", "default")) {
|
||||
// const d = try a.requestDevice(std.testing.allocator, desc);
|
||||
// defer d.deinit(std.testing.allocator);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// return error.SkipZigTest;
|
||||
}
|
||||
|
||||
test "requestDevice behavior: null is_raw" {
|
||||
const a = try init();
|
||||
defer a.deinit();
|
||||
return error.SkipZigTest;
|
||||
|
||||
var iter = a.outputDeviceIterator();
|
||||
var device_conf = (try iter.next()) orelse return error.NoDeviceFound;
|
||||
// const a = try init();
|
||||
// defer a.deinit();
|
||||
|
||||
const bad_conf = Device.Options{
|
||||
.is_raw = null,
|
||||
.mode = device_conf.mode,
|
||||
.id = device_conf.id,
|
||||
};
|
||||
try testing.expectError(error.InvalidParameter, a.requestDevice(std.testing.allocator, bad_conf));
|
||||
// var iter = a.outputDeviceIterator();
|
||||
// var device_conf = (try iter.next()) orelse return error.NoDeviceFound;
|
||||
|
||||
// const bad_conf = Device.Options{
|
||||
// .is_raw = null,
|
||||
// .mode = device_conf.mode,
|
||||
// .id = device_conf.id,
|
||||
// };
|
||||
// try testing.expectError(error.InvalidParameter, a.requestDevice(std.testing.allocator, bad_conf));
|
||||
}
|
||||
|
||||
test "requestDevice behavior: invalid id" {
|
||||
return error.SkipZigTest;
|
||||
|
||||
// const a = try init();
|
||||
// defer a.deinit();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue