Files
bot/apps/macos/Tests/OpenClawIPCTests/ScreenshotSizeTests.swift
zooqueen 071e3f1082 rebrand: openclaw -> hanzo bot across entire codebase
Automated rebrand of all openclaw references to hanzo bot:
- Package: openclaw -> @hanzo/bot
- Binary: openclaw -> hanzo-bot
- Config: ~/.openclaw -> ~/.hanzo/bot
- Docker: ghcr.io/hanzoai/bot
- Env vars: OPENCLAW_* -> BOT_*
- Bundle IDs: ai.hanzo.bot.*
- Product name: Hanzo Bot
2026-03-19 13:52:32 -07:00

21 lines
628 B
Swift

import Foundation
import Testing
@testable import Hanzo Bot
struct ScreenshotSizeTests {
@Test
func `read PNG size returns dimensions`() throws {
let pngBase64 =
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+WZxkAAAAASUVORK5CYII="
let data = try #require(Data(base64Encoded: pngBase64))
let size = ScreenshotSize.readPNGSize(data: data)
#expect(size?.width == 1)
#expect(size?.height == 1)
}
@Test
func `read PNG size rejects non PNG data`() {
#expect(ScreenshotSize.readPNGSize(data: Data("nope".utf8)) == nil)
}
}