Documentation ¶
Overview ¶
unittest is a package full of many independent and small translation examples
unittest has two package comments
Index ¶
- Constants
- func ArithmeticShifts(x uint32, y uint64) uint64
- func AssignNilPointer()
- func AssignNilSlice()
- func AssignOps()
- func BitwiseOps(x uint32, y uint64) uint64
- func ComparePointerToNil() bool
- func CompareSliceToNil() bool
- func Comparison(x uint64, y uint64) bool
- func DoNothing()
- func DoSomeLocking(l *sync.Mutex)
- func DoSomething(s string)
- func ImplicitLoopContinue()
- func ImplicitLoopContinue2()
- func ImplicitLoopContinueAfterIfBreak(i uint64)
- func IterateMapKeys(m map[uint64]uint64, sum *uint64)
- func LogicalAndEqualityOperators(b1 bool, x uint64) bool
- func LogicalOperators(b1 bool, b2 bool) bool
- func MapSize(m map[uint64]bool) uint64
- func MapTypeAliases(m1 map[IntWrapper]bool, m2 MapWrapper)
- func Oracle()
- func PanicAtTheDisco()
- func ReassignVars()
- func ReplicatedDiskRecover()
- func ReplicatedDiskWrite(a uint64, v Block)
- func Skip()
- func StringMap(m map[string]uint64) uint64
- func TakesFunctionType(f func())
- func ToBeDebugged(x uint64) uint64
- func TwoDiskLock(a uint64)
- func TwoDiskUnlock(a uint64)
- func TwoDiskWrite(diskId uint64, a uint64, v Block) bool
- func TyMethodDriver()
- func UseAdd() uint64
- func UseAddWithLiteral() uint64
- type A
- type B
- type Block
- type Dec
- type Enc
- type IntWrapper
- type MapWrapper
- type Point
- type S
- type SliceAlias
- type Timestamp
- type TwoInts
- type TyMethodInt
- type TyMethodSl
- type UseNamedType
- type UseTypeAbbrev
Constants ¶
View Source
const ConstWithAbbrevType also_u32 = 3
View Source
const ConstWithArith uint64 = 4 + 3*TypedInt
View Source
const Disk1 uint64 = 0
View Source
const Disk2 uint64 = 0
View Source
const DiskSize uint64 = 1000
View Source
const DivisionInConst uint64 = (4096 - 8) / 8
View Source
const GlobalConstant string = "foo"
View Source
const ModInConst uint64 = 513 + 12%8 // 517
View Source
const ModInConstParens uint64 = (513 + 12) % 8 // 5
View Source
const TypedInt uint64 = 32
View Source
const TypedInt32 uint32 = 3
View Source
const UntypedStringConstant = "bar" // an untyped string
Variables ¶
This section is empty.
Functions ¶
func ArithmeticShifts ¶
func AssignNilPointer ¶
func AssignNilPointer()
func AssignNilSlice ¶
func AssignNilSlice()
func BitwiseOps ¶
func ComparePointerToNil ¶
func ComparePointerToNil() bool
func CompareSliceToNil ¶
func CompareSliceToNil() bool
func Comparison ¶
func ImplicitLoopContinue ¶
func ImplicitLoopContinue()
func ImplicitLoopContinue2 ¶
func ImplicitLoopContinue2()
func ImplicitLoopContinueAfterIfBreak ¶
func ImplicitLoopContinueAfterIfBreak(i uint64)
func IterateMapKeys ¶
func LogicalOperators ¶
func MapTypeAliases ¶
func MapTypeAliases(m1 map[IntWrapper]bool, m2 MapWrapper)
func PanicAtTheDisco ¶
func PanicAtTheDisco()
func ReassignVars ¶
func ReassignVars()
func ReplicatedDiskRecover ¶
func ReplicatedDiskRecover()
func ReplicatedDiskWrite ¶
func TakesFunctionType ¶
func TakesFunctionType(f func())
func ToBeDebugged ¶
func TwoDiskLock ¶
func TwoDiskLock(a uint64)
TwoDiskLock is a dummy function to represent locking an address in the base layer
func TwoDiskUnlock ¶
func TwoDiskUnlock(a uint64)
TwoDiskUnlock is a dummy function to represent unlocking an address in the base layer
func TwoDiskWrite ¶
TwoDiskWrite is a dummy function to represent the base layer's disk write
func TyMethodDriver ¶
func TyMethodDriver()
Test both ptr and direct receiver methods since there's a tricky corner case there.
func UseAddWithLiteral ¶
func UseAddWithLiteral() uint64
Types ¶
type IntWrapper ¶
type IntWrapper uint64
type MapWrapper ¶
type SliceAlias ¶
type SliceAlias []bool
type TyMethodInt ¶
type TyMethodInt uint64
type TyMethodSl ¶
type TyMethodSl []byte
type UseNamedType ¶
type UseNamedType Timestamp
type UseTypeAbbrev ¶
type UseTypeAbbrev my_u64
Source Files ¶
- comments.go
- condvar.go
- const.go
- control_flow.go
- conversions.go
- copy.go
- data_structures.go
- disk.go
- empty_functions.go
- encoding.go
- generics.go
- higher_order.go
- ints.go
- literals.go
- locks.go
- log_debugging.go
- loops.go
- maps.go
- multiple.go
- nil.go
- operators.go
- package.go
- panic.go
- proph.go
- reassign.go
- recursive.go
- replicated_disk.go
- slices.go
- spawn.go
- strings.go
- struct_method.go
- struct_pointers.go
- synchronization.go
- time.go
- topsort.go
- trailing_call.go
- ty_method.go
- type_alias.go
Click to show internal directories.
Click to hide internal directories.