다음을 통해 공유


Assert.AreNotEqual 메서드 (Single, Single, Single)

지정한 두 single이 서로 같지 않거나 지정된 정확도 범위 내에 있지 않은지 확인합니다.서로 같거나 지정된 정확도 범위 내에 있으면 어설션이 실패합니다.

네임스페이스:  Microsoft.VisualStudio.TestTools.UnitTesting
어셈블리:  Microsoft.VisualStudio.QualityTools.UnitTestFramework(Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

구문

‘선언
Public Shared Sub AreNotEqual ( _
    notExpected As Single, _
    actual As Single, _
    delta As Single _
)
public static void AreNotEqual(
    float notExpected,
    float actual,
    float delta
)
public:
static void AreNotEqual(
    float notExpected, 
    float actual, 
    float delta
)
static member AreNotEqual : 
        notExpected:float32 * 
        actual:float32 * 
        delta:float32 -> unit 
public static function AreNotEqual(
    notExpected : float, 
    actual : float, 
    delta : float
)

매개 변수

  • notExpected
    형식: System.Single
    비교할 첫 번째 single입니다.단위 테스트에서 예상하는 single입니다.
  • actual
    형식: System.Single
    비교할 두 번째 single입니다.단위 테스트에서 생성한 single입니다.
  • delta
    형식: System.Single
    요구되는 오차입니다. notExpected가 actual과 같거나 두 값의 차이가 delta 미만인 경우에만 어설션이 실패합니다.

예외

예외 조건
AssertFailedException

notExpected가 actual과 같거나 두 값의 차이가 delta 미만인 경우

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

Assert 클래스

AreNotEqual 오버로드

Microsoft.VisualStudio.TestTools.UnitTesting 네임스페이스

기타 리소스

Assert 클래스 사용