断言4小时 该库旨在提供一组组合器,以断言任意嵌套的数据结构。这个库的灵感来自于Java的AssertJ,断言的组成受到了lens库的启发。 例子: data Foo = Foo { name :: String , age :: Int } deriving ( Show , Eq ) assertThat ( Foo " someName " 15 ) $ isEqualTo ( Foo " someN1ame " 15 ) . focus age . tag " age " . isGreaterThan 20 造成 given Foo {name = " someName " , age = 15 } should be equal to Foo {name = " someN1ame " , age = 15 } Foo {na