Add support for uint args in expected calls in MockObject
This commit is contained in:
parent
bc64cd9847
commit
91caff487b
1 changed files with 19 additions and 0 deletions
|
|
@ -44,6 +44,21 @@ private class IntArgument : Object, Argument {
|
|||
|
||||
}
|
||||
|
||||
private class UintArgument : Object, Argument {
|
||||
|
||||
private uint value;
|
||||
|
||||
internal UintArgument(uint value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public new void assert(Object object) throws Error {
|
||||
assert_true(object is UintArgument, "Expected uint value");
|
||||
assert_uint(this.value, ((UintArgument) object).value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an expected method call on a mock object.
|
||||
*
|
||||
|
|
@ -145,6 +160,10 @@ public interface MockObject {
|
|||
return new IntArgument(value);
|
||||
}
|
||||
|
||||
public static Object uint_arg(uint value) {
|
||||
return new UintArgument(value);
|
||||
}
|
||||
|
||||
protected abstract Gee.Queue<ExpectedCall> expected { get; set; }
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue