Canonical empty memo test (#112)
This commit is contained in:
parent
36f2d0730a
commit
1d71bc30c4
|
@ -49,6 +49,13 @@ class MemoTests: XCTestCase {
|
|||
XCTAssertNil(emptyMemoData.asZcashTransactionMemo())
|
||||
}
|
||||
|
||||
/**
|
||||
test canonical memos
|
||||
*/
|
||||
func testCanonicalBlankMemos() throws {
|
||||
XCTAssertNil(Self.canonicalEmptyMemo().asZcashTransactionMemo())
|
||||
}
|
||||
|
||||
/**
|
||||
*******
|
||||
* mocked memos
|
||||
|
@ -75,6 +82,12 @@ class MemoTests: XCTestCase {
|
|||
|
||||
static let expectedEmojiMemoString = "💕💕💕🦓🦓🦓🛡🛡🛡"
|
||||
|
||||
static func canonicalEmptyMemo() -> Data {
|
||||
var bytes = [UInt8](repeating: 0, count: 512)
|
||||
bytes[0] = UInt8(0xF6)
|
||||
return Data(bytes: &bytes, count: 512)
|
||||
}
|
||||
|
||||
static func randomMemoData() -> Data? {
|
||||
let length: Int = 512
|
||||
var keyData = Data(count: length)
|
||||
|
|
Loading…
Reference in New Issue