---
title: NSScriptWhoseTest
framework: foundation
role: symbol
role_heading: Class
path: foundation/nsscriptwhosetest
---

# NSScriptWhoseTest

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

## Declaration

```swift
class NSScriptWhoseTest
```

## Overview

Overview NSScriptWhoseTest is an abstract class whose sole method is 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 and NSLogicalTest. In evaluating itself, an NSWhoseSpecifier invokes the 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()](foundation/nsscriptwhosetest/istrue().md)

### Initializers

- [init()](foundation/nsscriptwhosetest/init().md)
- [init(coder:)](foundation/nsscriptwhosetest/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [NSLogicalTest](foundation/nslogicaltest.md)
- [NSSpecifierTest](foundation/nsspecifiertest.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Object Matching Tests

- [NSSpecifierTest](foundation/nsspecifiertest.md)
- [NSLogicalTest](foundation/nslogicaltest.md)
