<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSScriptWhoseTest",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScriptWhoseTest"
  },
  "title" : "NSScriptWhoseTest"
}
-->

# NSScriptWhoseTest

An abstract class that provides the basis for testing specifiers one at a time or in groups.

```
class NSScriptWhoseTest
```

## Overview

`NSScriptWhoseTest` is an abstract class whose sole method is [`isTrue()`](/documentation/Foundation/NSScriptWhoseTest/isTrue()). Two concrete subclasses of `NSScriptWhoseTest` generate objects representing Boolean expressions comparing one object with another and objects representing multiple Boolean expressions connected by logical operators (`OR`, `AND`, `NOT`). These classes are, respectively, [`NSSpecifierTest`](/documentation/Foundation/NSSpecifierTest) and [`NSLogicalTest`](/documentation/Foundation/NSLogicalTest). In evaluating itself, an [`NSWhoseSpecifier`](/documentation/Foundation/NSWhoseSpecifier) invokes the [`isTrue()`](/documentation/Foundation/NSScriptWhoseTest/isTrue()) method of its “test” object.

You shouldn’t need to subclass `NSScriptWhoseTest`, and you should rarely need to subclass one of its subclasses.

## Topics

### Evaluating a test

[`-  isTrue`](/documentation/Foundation/NSScriptWhoseTest/isTrue())

Returns a Boolean value that indicates whether the test represented by the receiver evaluates to true.

## Relationships

### Inherited By

[`NSSpecifierTest`](/documentation/Foundation/NSSpecifierTest)

[`NSLogicalTest`](/documentation/Foundation/NSLogicalTest)

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)