Package-level declarations

Types

Link copied to clipboard
expect class AtomicRef<T>
actual class AtomicRef<T>
actual class AtomicRef<T>
Link copied to clipboard
actual data class CallLocation : Comparable<CallLocation>
actual data class CallLocation : Comparable<CallLocation>

Represents the line at which user code called into Selfie.

Link copied to clipboard
class CallStack(val location: CallLocation, val restOfStack: List<CallLocation>)

Represents the callstack above a given CallLocation.

Link copied to clipboard

Tracks whether a given file has a comment which allows it to be written to. Thread-safe on multithreaded platforms.

Link copied to clipboard

Used by com.diffplug.selfie.SelfieSuspend.

Link copied to clipboard
interface DiskStorage

Represents the disk storage for a specific test.

Link copied to clipboard
Link copied to clipboard
interface FS
Link copied to clipboard
Link copied to clipboard
abstract class LiteralFormat<T : Any>
Link copied to clipboard
class LiteralValue<T : Any>(val expected: T?, val actual: T, val format: LiteralFormat<T>)
Link copied to clipboard
expect class ReentrantLock
actual class ReentrantLock
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface SnapshotSystem

NOT FOR ENDUSERS. Implemented by Selfie to integrate with various test frameworks.

Link copied to clipboard
class SourceFile(filename: String, content: String, val language: Language)
Link copied to clipboard
class SourcePathCache(functionToCache: (CallLocation) -> TypedPath?, capacity: Int)
Link copied to clipboard
class ToBeFileLazyBytes(val location: TypedPath, val layout: SnapshotFileLayout, data: ByteArray)
Link copied to clipboard

Some kinds of _TODO don't change the argument at all.

Link copied to clipboard
data class TypedPath(val absolutePath: String) : Comparable<TypedPath>

A unix-style path where trailing-slash means it is a folder.

Link copied to clipboard

Handles garbage collection of snapshots within a single test.

Link copied to clipboard
sealed class WriteTracker<K : Comparable<K>, V>

For tracking the writes of disk snapshots literals.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
expect fun <T> atomic(initial: T): AtomicRef<T>

Replace with atomicfu when stable.

actual fun <T> atomic(initial: T): AtomicRef<T>
actual fun <T> atomic(initial: T): AtomicRef<T>
Link copied to clipboard
Link copied to clipboard
actual inline fun reentrantLock(): ReentrantLock
actual inline fun reentrantLock(): ReentrantLock
Link copied to clipboard
expect inline fun <T> ReentrantLock.withLock(block: () -> T): T
actual inline fun <T> ReentrantLock.withLock(block: () -> T): T