You've already forked linux-packaging-mono
Imported Upstream version 5.0.0.42
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
parent
1190d13a04
commit
6bdd276d05
28
external/corefx/src/System.Threading.Timer/tests/TimerChangeTests.netstandard.cs
vendored
Normal file
28
external/corefx/src/System.Threading.Timer/tests/TimerChangeTests.netstandard.cs
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Xunit;
|
||||
|
||||
public partial class TimerChangeTests
|
||||
{
|
||||
[Fact]
|
||||
public void Timer_Change_Int64_Negative()
|
||||
{
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => new Timer(EmptyTimerTarget).Change((long)-2, (long)-1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => new Timer(EmptyTimerTarget).Change((long)-1, (long)-2));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => new Timer(EmptyTimerTarget).Change((long)0xffffffff, (long)-1));
|
||||
Assert.Throws<ArgumentOutOfRangeException>(() => new Timer(EmptyTimerTarget).Change((long)-1, (long)0xffffffff));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Timer_Change_UInt32_Int64_AfterDispose_Throws()
|
||||
{
|
||||
var t = new Timer(EmptyTimerTarget);
|
||||
t.Dispose();
|
||||
Assert.Throws<ObjectDisposedException>(() => t.Change(0u, 0u));
|
||||
Assert.Throws<ObjectDisposedException>(() => t.Change(0L, 0L));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user