WIP: Test Coverage #14

Draft
jeff wants to merge 15 commits from tests into main
Owner

Reworked error handling and added initial tests

Error handling had to be revamped for proper testing. I also wrapped the
serial port in an interface so a mock port could be used for testing.

Initial test coverage is current a WIP.

# Reworked error handling and added initial tests Error handling had to be revamped for proper testing. I also wrapped the serial port in an interface so a mock port could be used for testing. Initial test coverage is current a WIP.
Reworked error handling and added initial tests
Some checks failed
Test / test (pull_request) Failing after 2m43s
b7bc163482
Error handling had to be revamped for proper testing. I also wrapped the
serial port in an interface so a mock port could be used for testing.
Added coverage report action
All checks were successful
Test / test (pull_request) Successful in 54s
6b9170fb82
jeff added this to the goedlink project 2024-07-23 15:59:24 +00:00
jeff self-assigned this 2024-07-23 15:59:30 +00:00

forge.rights.ninja/jeff/goedlink/n8/n8command.go:31: SendString 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:52: GetConfig 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:66: CopyFolder 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:97: getFiles 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:114: getDirectories 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:134: CopyFile 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:208: SetConfig 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:217: Command 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:228: SelectGame 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:248: getTestMapper 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:274: MakeDir 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:291: Halt 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:310: HaltExit 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:323: MapLoadSDC 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:363: Reboot 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:383: LoadOS 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:442: LoadGame 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:514: GetVdc 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:530: GetRtc 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:546: SetRtc 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:566: EnterServiceMode 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:604: ExitServiceMode 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:636: isServiceMode 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:651: Recovery 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:717: bootWait 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:750: FifoWr 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:758: MemoryCrc 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:787: MemorySet 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:824: MemoryTest 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:854: ReadFlash 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:874: ReadMemory 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:927: WriteFlash 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:960: WriteMemory 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:994: fpgaPostInit 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:1016: FpgaInit 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:1037: FpgaInitFromFlash 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8command.go:1058: FpgaInitFromSD 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:46: GetSerialConfig 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:53: GetMapIndex 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:56: GetSubmap 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:59: GetPrgSize 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:62: GetChrSize 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:65: GetSrmSize 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:68: GetMasterVol 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:71: GetSSKeyMenu 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:74: GetSSKeySave 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:77: GetSSKeyLoad 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:80: GetMapCfg 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:83: GetCtrl 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:88: NewMapConfigFromBinary 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:101: NewMapConfig 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:113: NewConfigFromNesRom 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:143: Parse 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:157: Serialize 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:174: PrintFull 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:218: Print 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:227: boolToYesNo 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8config.go:234: getMask 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:43: GetFileInfo 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:79: SetFileInfo 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:90: DirRead 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:127: GetDirRecords 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:176: FileCrc 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:208: OpenFile 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:228: CloseFile 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:249: FileSetPointer 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:274: DirOpen 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:299: DirLoad 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:329: GetDirSize 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:345: ReadFile 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:389: ReadFileFromMemory 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:436: FileWrite 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:465: FileWriteFromMemory 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:509: mkdir 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:538: DeleteRecord 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:569: DiskInit 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:591: DiskRead 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8files.go:633: changeExtension 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:28: NewVdc 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:61: GetVals 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:70: Print 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:77: NewRtcTime 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:89: NewRtcTimeFromSerial 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:109: decToHex 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:91: Read 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:94: Write 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:97: Close 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:105: CloseSerial 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:115: InitSerial 71.4%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:142: TxData 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:158: Tx8 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:166: Tx16 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:174: Tx32 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:184: TxCmd 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:205: TxCmdExec 100.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:213: TxString 71.4%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:230: TxStringFifo 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:247: TxDataACK 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:280: RxData 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:304: Rx8 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:315: Rx16 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:326: Rx32 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:340: RxString 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:357: RxFileInfo 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:391: GetStatus 0.0%
forge.rights.ninja/jeff/goedlink/n8/n8serial.go:409: IsStatusOkay 0.0%
total: (statements) 4.1%

forge.rights.ninja/jeff/goedlink/n8/n8command.go:31: SendString 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:52: GetConfig 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:66: CopyFolder 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:97: getFiles 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:114: getDirectories 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:134: CopyFile 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:208: SetConfig 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:217: Command 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:228: SelectGame 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:248: getTestMapper 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:274: MakeDir 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:291: Halt 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:310: HaltExit 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:323: MapLoadSDC 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:363: Reboot 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:383: LoadOS 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:442: LoadGame 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:514: GetVdc 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:530: GetRtc 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:546: SetRtc 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:566: EnterServiceMode 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:604: ExitServiceMode 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:636: isServiceMode 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:651: Recovery 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:717: bootWait 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:750: FifoWr 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:758: MemoryCrc 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:787: MemorySet 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:824: MemoryTest 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:854: ReadFlash 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:874: ReadMemory 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:927: WriteFlash 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:960: WriteMemory 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:994: fpgaPostInit 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:1016: FpgaInit 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:1037: FpgaInitFromFlash 0.0% forge.rights.ninja/jeff/goedlink/n8/n8command.go:1058: FpgaInitFromSD 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:46: GetSerialConfig 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:53: GetMapIndex 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:56: GetSubmap 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:59: GetPrgSize 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:62: GetChrSize 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:65: GetSrmSize 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:68: GetMasterVol 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:71: GetSSKeyMenu 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:74: GetSSKeySave 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:77: GetSSKeyLoad 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:80: GetMapCfg 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:83: GetCtrl 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:88: NewMapConfigFromBinary 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:101: NewMapConfig 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:113: NewConfigFromNesRom 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:143: Parse 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:157: Serialize 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:174: PrintFull 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:218: Print 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:227: boolToYesNo 0.0% forge.rights.ninja/jeff/goedlink/n8/n8config.go:234: getMask 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:43: GetFileInfo 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:79: SetFileInfo 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:90: DirRead 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:127: GetDirRecords 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:176: FileCrc 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:208: OpenFile 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:228: CloseFile 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:249: FileSetPointer 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:274: DirOpen 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:299: DirLoad 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:329: GetDirSize 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:345: ReadFile 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:389: ReadFileFromMemory 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:436: FileWrite 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:465: FileWriteFromMemory 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:509: mkdir 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:538: DeleteRecord 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:569: DiskInit 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:591: DiskRead 0.0% forge.rights.ninja/jeff/goedlink/n8/n8files.go:633: changeExtension 0.0% forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:28: NewVdc 0.0% forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:61: GetVals 0.0% forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:70: Print 0.0% forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:77: NewRtcTime 0.0% forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:89: NewRtcTimeFromSerial 0.0% forge.rights.ninja/jeff/goedlink/n8/n8hardware.go:109: decToHex 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:91: Read 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:94: Write 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:97: Close 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:105: CloseSerial 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:115: InitSerial 71.4% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:142: TxData 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:158: Tx8 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:166: Tx16 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:174: Tx32 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:184: TxCmd 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:205: TxCmdExec 100.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:213: TxString 71.4% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:230: TxStringFifo 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:247: TxDataACK 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:280: RxData 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:304: Rx8 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:315: Rx16 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:326: Rx32 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:340: RxString 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:357: RxFileInfo 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:391: GetStatus 0.0% forge.rights.ninja/jeff/goedlink/n8/n8serial.go:409: IsStatusOkay 0.0% total: (statements) 4.1%
Added script to format the coverage report
All checks were successful
Test / test (pull_request) Successful in 56s
548da075e6
Coverage Function File Line
0.0% SendString n8/n8command.go 31
0.0% GetConfig n8/n8command.go 52
0.0% CopyFolder n8/n8command.go 66
0.0% getFiles n8/n8command.go 97
0.0% getDirectories n8/n8command.go 114
0.0% CopyFile n8/n8command.go 134
0.0% SetConfig n8/n8command.go 208
0.0% Command n8/n8command.go 217
0.0% SelectGame n8/n8command.go 228
0.0% getTestMapper n8/n8command.go 248
0.0% MakeDir n8/n8command.go 274
0.0% Halt n8/n8command.go 291
0.0% HaltExit n8/n8command.go 310
0.0% MapLoadSDC n8/n8command.go 323
0.0% Reboot n8/n8command.go 363
0.0% LoadOS n8/n8command.go 383
0.0% LoadGame n8/n8command.go 442
0.0% GetVdc n8/n8command.go 514
0.0% GetRtc n8/n8command.go 530
0.0% SetRtc n8/n8command.go 546
0.0% EnterServiceMode n8/n8command.go 566
0.0% ExitServiceMode n8/n8command.go 604
0.0% isServiceMode n8/n8command.go 636
0.0% Recovery n8/n8command.go 651
0.0% bootWait n8/n8command.go 717
0.0% FifoWr n8/n8command.go 750
0.0% MemoryCrc n8/n8command.go 758
0.0% MemorySet n8/n8command.go 787
0.0% MemoryTest n8/n8command.go 824
0.0% ReadFlash n8/n8command.go 854
0.0% ReadMemory n8/n8command.go 874
0.0% WriteFlash n8/n8command.go 927
0.0% WriteMemory n8/n8command.go 960
0.0% fpgaPostInit n8/n8command.go 994
0.0% FpgaInit n8/n8command.go 1016
0.0% FpgaInitFromFlash n8/n8command.go 1037
0.0% FpgaInitFromSD n8/n8command.go 1058
0.0% GetSerialConfig n8/n8config.go 46
0.0% GetMapIndex n8/n8config.go 53
0.0% GetSubmap n8/n8config.go 56
0.0% GetPrgSize n8/n8config.go 59
0.0% GetChrSize n8/n8config.go 62
0.0% GetSrmSize n8/n8config.go 65
0.0% GetMasterVol n8/n8config.go 68
0.0% GetSSKeyMenu n8/n8config.go 71
0.0% GetSSKeySave n8/n8config.go 74
0.0% GetSSKeyLoad n8/n8config.go 77
0.0% GetMapCfg n8/n8config.go 80
0.0% GetCtrl n8/n8config.go 83
0.0% NewMapConfigFromBinary n8/n8config.go 88
0.0% NewMapConfig n8/n8config.go 101
0.0% NewConfigFromNesRom n8/n8config.go 113
0.0% Parse n8/n8config.go 143
0.0% Serialize n8/n8config.go 157
0.0% PrintFull n8/n8config.go 174
0.0% Print n8/n8config.go 218
0.0% boolToYesNo n8/n8config.go 227
0.0% getMask n8/n8config.go 234
0.0% GetFileInfo n8/n8files.go 43
0.0% SetFileInfo n8/n8files.go 79
0.0% DirRead n8/n8files.go 90
0.0% GetDirRecords n8/n8files.go 127
0.0% FileCrc n8/n8files.go 176
0.0% OpenFile n8/n8files.go 208
0.0% CloseFile n8/n8files.go 228
0.0% FileSetPointer n8/n8files.go 249
0.0% DirOpen n8/n8files.go 274
0.0% DirLoad n8/n8files.go 299
0.0% GetDirSize n8/n8files.go 329
0.0% ReadFile n8/n8files.go 345
0.0% ReadFileFromMemory n8/n8files.go 389
0.0% FileWrite n8/n8files.go 436
0.0% FileWriteFromMemory n8/n8files.go 465
0.0% mkdir n8/n8files.go 509
0.0% DeleteRecord n8/n8files.go 538
0.0% DiskInit n8/n8files.go 569
0.0% DiskRead n8/n8files.go 591
0.0% changeExtension n8/n8files.go 633
0.0% NewVdc n8/n8hardware.go 28
0.0% GetVals n8/n8hardware.go 61
0.0% Print n8/n8hardware.go 70
0.0% NewRtcTime n8/n8hardware.go 77
0.0% NewRtcTimeFromSerial n8/n8hardware.go 89
0.0% decToHex n8/n8hardware.go 109
100.0% Read n8/n8serial.go 91
100.0% Write n8/n8serial.go 94
100.0% Close n8/n8serial.go 97
100.0% CloseSerial n8/n8serial.go 105
71.4% InitSerial n8/n8serial.go 115
100.0% TxData n8/n8serial.go 142
100.0% Tx8 n8/n8serial.go 158
100.0% Tx16 n8/n8serial.go 166
100.0% Tx32 n8/n8serial.go 174
100.0% TxCmd n8/n8serial.go 184
100.0% TxCmdExec n8/n8serial.go 205
71.4% TxString n8/n8serial.go 213
0.0% TxStringFifo n8/n8serial.go 230
0.0% TxDataACK n8/n8serial.go 247
0.0% RxData n8/n8serial.go 280
0.0% Rx8 n8/n8serial.go 304
0.0% Rx16 n8/n8serial.go 315
0.0% Rx32 n8/n8serial.go 326
0.0% RxString n8/n8serial.go 340
0.0% RxFileInfo n8/n8serial.go 357
0.0% GetStatus n8/n8serial.go 391
0.0% IsStatusOkay n8/n8serial.go 409

Total Coverage: 4.1%

| Coverage | Function | File | Line | | --- | --- | --- | --- | | 0.0% | SendString | n8/n8command.go | 31 | | 0.0% | GetConfig | n8/n8command.go | 52 | | 0.0% | CopyFolder | n8/n8command.go | 66 | | 0.0% | getFiles | n8/n8command.go | 97 | | 0.0% | getDirectories | n8/n8command.go | 114 | | 0.0% | CopyFile | n8/n8command.go | 134 | | 0.0% | SetConfig | n8/n8command.go | 208 | | 0.0% | Command | n8/n8command.go | 217 | | 0.0% | SelectGame | n8/n8command.go | 228 | | 0.0% | getTestMapper | n8/n8command.go | 248 | | 0.0% | MakeDir | n8/n8command.go | 274 | | 0.0% | Halt | n8/n8command.go | 291 | | 0.0% | HaltExit | n8/n8command.go | 310 | | 0.0% | MapLoadSDC | n8/n8command.go | 323 | | 0.0% | Reboot | n8/n8command.go | 363 | | 0.0% | LoadOS | n8/n8command.go | 383 | | 0.0% | LoadGame | n8/n8command.go | 442 | | 0.0% | GetVdc | n8/n8command.go | 514 | | 0.0% | GetRtc | n8/n8command.go | 530 | | 0.0% | SetRtc | n8/n8command.go | 546 | | 0.0% | EnterServiceMode | n8/n8command.go | 566 | | 0.0% | ExitServiceMode | n8/n8command.go | 604 | | 0.0% | isServiceMode | n8/n8command.go | 636 | | 0.0% | Recovery | n8/n8command.go | 651 | | 0.0% | bootWait | n8/n8command.go | 717 | | 0.0% | FifoWr | n8/n8command.go | 750 | | 0.0% | MemoryCrc | n8/n8command.go | 758 | | 0.0% | MemorySet | n8/n8command.go | 787 | | 0.0% | MemoryTest | n8/n8command.go | 824 | | 0.0% | ReadFlash | n8/n8command.go | 854 | | 0.0% | ReadMemory | n8/n8command.go | 874 | | 0.0% | WriteFlash | n8/n8command.go | 927 | | 0.0% | WriteMemory | n8/n8command.go | 960 | | 0.0% | fpgaPostInit | n8/n8command.go | 994 | | 0.0% | FpgaInit | n8/n8command.go | 1016 | | 0.0% | FpgaInitFromFlash | n8/n8command.go | 1037 | | 0.0% | FpgaInitFromSD | n8/n8command.go | 1058 | | 0.0% | GetSerialConfig | n8/n8config.go | 46 | | 0.0% | GetMapIndex | n8/n8config.go | 53 | | 0.0% | GetSubmap | n8/n8config.go | 56 | | 0.0% | GetPrgSize | n8/n8config.go | 59 | | 0.0% | GetChrSize | n8/n8config.go | 62 | | 0.0% | GetSrmSize | n8/n8config.go | 65 | | 0.0% | GetMasterVol | n8/n8config.go | 68 | | 0.0% | GetSSKeyMenu | n8/n8config.go | 71 | | 0.0% | GetSSKeySave | n8/n8config.go | 74 | | 0.0% | GetSSKeyLoad | n8/n8config.go | 77 | | 0.0% | GetMapCfg | n8/n8config.go | 80 | | 0.0% | GetCtrl | n8/n8config.go | 83 | | 0.0% | NewMapConfigFromBinary | n8/n8config.go | 88 | | 0.0% | NewMapConfig | n8/n8config.go | 101 | | 0.0% | NewConfigFromNesRom | n8/n8config.go | 113 | | 0.0% | Parse | n8/n8config.go | 143 | | 0.0% | Serialize | n8/n8config.go | 157 | | 0.0% | PrintFull | n8/n8config.go | 174 | | 0.0% | Print | n8/n8config.go | 218 | | 0.0% | boolToYesNo | n8/n8config.go | 227 | | 0.0% | getMask | n8/n8config.go | 234 | | 0.0% | GetFileInfo | n8/n8files.go | 43 | | 0.0% | SetFileInfo | n8/n8files.go | 79 | | 0.0% | DirRead | n8/n8files.go | 90 | | 0.0% | GetDirRecords | n8/n8files.go | 127 | | 0.0% | FileCrc | n8/n8files.go | 176 | | 0.0% | OpenFile | n8/n8files.go | 208 | | 0.0% | CloseFile | n8/n8files.go | 228 | | 0.0% | FileSetPointer | n8/n8files.go | 249 | | 0.0% | DirOpen | n8/n8files.go | 274 | | 0.0% | DirLoad | n8/n8files.go | 299 | | 0.0% | GetDirSize | n8/n8files.go | 329 | | 0.0% | ReadFile | n8/n8files.go | 345 | | 0.0% | ReadFileFromMemory | n8/n8files.go | 389 | | 0.0% | FileWrite | n8/n8files.go | 436 | | 0.0% | FileWriteFromMemory | n8/n8files.go | 465 | | 0.0% | mkdir | n8/n8files.go | 509 | | 0.0% | DeleteRecord | n8/n8files.go | 538 | | 0.0% | DiskInit | n8/n8files.go | 569 | | 0.0% | DiskRead | n8/n8files.go | 591 | | 0.0% | changeExtension | n8/n8files.go | 633 | | 0.0% | NewVdc | n8/n8hardware.go | 28 | | 0.0% | GetVals | n8/n8hardware.go | 61 | | 0.0% | Print | n8/n8hardware.go | 70 | | 0.0% | NewRtcTime | n8/n8hardware.go | 77 | | 0.0% | NewRtcTimeFromSerial | n8/n8hardware.go | 89 | | 0.0% | decToHex | n8/n8hardware.go | 109 | | 100.0% | Read | n8/n8serial.go | 91 | | 100.0% | Write | n8/n8serial.go | 94 | | 100.0% | Close | n8/n8serial.go | 97 | | 100.0% | CloseSerial | n8/n8serial.go | 105 | | 71.4% | InitSerial | n8/n8serial.go | 115 | | 100.0% | TxData | n8/n8serial.go | 142 | | 100.0% | Tx8 | n8/n8serial.go | 158 | | 100.0% | Tx16 | n8/n8serial.go | 166 | | 100.0% | Tx32 | n8/n8serial.go | 174 | | 100.0% | TxCmd | n8/n8serial.go | 184 | | 100.0% | TxCmdExec | n8/n8serial.go | 205 | | 71.4% | TxString | n8/n8serial.go | 213 | | 0.0% | TxStringFifo | n8/n8serial.go | 230 | | 0.0% | TxDataACK | n8/n8serial.go | 247 | | 0.0% | RxData | n8/n8serial.go | 280 | | 0.0% | Rx8 | n8/n8serial.go | 304 | | 0.0% | Rx16 | n8/n8serial.go | 315 | | 0.0% | Rx32 | n8/n8serial.go | 326 | | 0.0% | RxString | n8/n8serial.go | 340 | | 0.0% | RxFileInfo | n8/n8serial.go | 357 | | 0.0% | GetStatus | n8/n8serial.go | 391 | | 0.0% | IsStatusOkay | n8/n8serial.go | 409 | ## Total Coverage: 4.1%
Started work on a better test format with sub-tests
All checks were successful
Test / test (pull_request) Successful in 1m1s
a67e58dd0d
This is much clearer and easier to write iterative tests.
Coverage Function File Line
0.0% SendString n8/n8command.go 31
0.0% GetConfig n8/n8command.go 52
0.0% CopyFolder n8/n8command.go 66
0.0% getFiles n8/n8command.go 97
0.0% getDirectories n8/n8command.go 114
0.0% CopyFile n8/n8command.go 134
0.0% SetConfig n8/n8command.go 208
0.0% Command n8/n8command.go 217
0.0% SelectGame n8/n8command.go 228
0.0% getTestMapper n8/n8command.go 248
0.0% MakeDir n8/n8command.go 274
0.0% Halt n8/n8command.go 291
0.0% HaltExit n8/n8command.go 310
0.0% MapLoadSDC n8/n8command.go 323
0.0% Reboot n8/n8command.go 363
0.0% LoadOS n8/n8command.go 383
0.0% LoadGame n8/n8command.go 442
0.0% GetVdc n8/n8command.go 514
0.0% GetRtc n8/n8command.go 530
0.0% SetRtc n8/n8command.go 546
0.0% EnterServiceMode n8/n8command.go 566
0.0% ExitServiceMode n8/n8command.go 604
0.0% isServiceMode n8/n8command.go 636
0.0% Recovery n8/n8command.go 651
0.0% bootWait n8/n8command.go 717
100.0% FifoWr n8/n8command.go 750
0.0% MemoryCrc n8/n8command.go 758
0.0% MemorySet n8/n8command.go 787
0.0% MemoryTest n8/n8command.go 824
0.0% ReadFlash n8/n8command.go 854
0.0% ReadMemory n8/n8command.go 874
0.0% WriteFlash n8/n8command.go 927
72.2% WriteMemory n8/n8command.go 960
0.0% fpgaPostInit n8/n8command.go 994
0.0% FpgaInit n8/n8command.go 1016
0.0% FpgaInitFromFlash n8/n8command.go 1037
0.0% FpgaInitFromSD n8/n8command.go 1058
0.0% GetSerialConfig n8/n8config.go 46
0.0% GetMapIndex n8/n8config.go 53
0.0% GetSubmap n8/n8config.go 56
0.0% GetPrgSize n8/n8config.go 59
0.0% GetChrSize n8/n8config.go 62
0.0% GetSrmSize n8/n8config.go 65
0.0% GetMasterVol n8/n8config.go 68
0.0% GetSSKeyMenu n8/n8config.go 71
0.0% GetSSKeySave n8/n8config.go 74
0.0% GetSSKeyLoad n8/n8config.go 77
0.0% GetMapCfg n8/n8config.go 80
0.0% GetCtrl n8/n8config.go 83
0.0% NewMapConfigFromBinary n8/n8config.go 88
0.0% NewMapConfig n8/n8config.go 101
0.0% NewConfigFromNesRom n8/n8config.go 113
0.0% Parse n8/n8config.go 143
0.0% Serialize n8/n8config.go 157
0.0% PrintFull n8/n8config.go 174
0.0% Print n8/n8config.go 218
0.0% boolToYesNo n8/n8config.go 227
0.0% getMask n8/n8config.go 234
0.0% GetFileInfo n8/n8files.go 43
0.0% SetFileInfo n8/n8files.go 79
0.0% DirRead n8/n8files.go 90
0.0% GetDirRecords n8/n8files.go 127
0.0% FileCrc n8/n8files.go 176
0.0% OpenFile n8/n8files.go 208
0.0% CloseFile n8/n8files.go 228
0.0% FileSetPointer n8/n8files.go 249
0.0% DirOpen n8/n8files.go 274
0.0% DirLoad n8/n8files.go 299
0.0% GetDirSize n8/n8files.go 329
0.0% ReadFile n8/n8files.go 345
0.0% ReadFileFromMemory n8/n8files.go 389
0.0% FileWrite n8/n8files.go 436
0.0% FileWriteFromMemory n8/n8files.go 465
0.0% mkdir n8/n8files.go 509
0.0% DeleteRecord n8/n8files.go 538
0.0% DiskInit n8/n8files.go 569
0.0% DiskRead n8/n8files.go 591
0.0% changeExtension n8/n8files.go 633
0.0% NewVdc n8/n8hardware.go 28
0.0% GetVals n8/n8hardware.go 61
0.0% Print n8/n8hardware.go 70
0.0% NewRtcTime n8/n8hardware.go 77
0.0% NewRtcTimeFromSerial n8/n8hardware.go 89
0.0% decToHex n8/n8hardware.go 109
100.0% Read n8/n8serial.go 91
100.0% Write n8/n8serial.go 94
100.0% Close n8/n8serial.go 97
100.0% CloseSerial n8/n8serial.go 105
71.4% InitSerial n8/n8serial.go 115
100.0% TxData n8/n8serial.go 142
100.0% Tx8 n8/n8serial.go 158
100.0% Tx16 n8/n8serial.go 166
100.0% Tx32 n8/n8serial.go 174
100.0% TxCmd n8/n8serial.go 184
100.0% TxCmdExec n8/n8serial.go 205
100.0% TxString n8/n8serial.go 213
100.0% TxStringFifo n8/n8serial.go 230
0.0% TxDataACK n8/n8serial.go 247
0.0% RxData n8/n8serial.go 280
0.0% Rx8 n8/n8serial.go 304
0.0% Rx16 n8/n8serial.go 315
0.0% Rx32 n8/n8serial.go 326
0.0% RxString n8/n8serial.go 340
0.0% RxFileInfo n8/n8serial.go 357
0.0% GetStatus n8/n8serial.go 391
0.0% IsStatusOkay n8/n8serial.go 409

Total Coverage: 6.1%

| Coverage | Function | File | Line | | --- | --- | --- | --- | | 0.0% | SendString | n8/n8command.go | 31 | | 0.0% | GetConfig | n8/n8command.go | 52 | | 0.0% | CopyFolder | n8/n8command.go | 66 | | 0.0% | getFiles | n8/n8command.go | 97 | | 0.0% | getDirectories | n8/n8command.go | 114 | | 0.0% | CopyFile | n8/n8command.go | 134 | | 0.0% | SetConfig | n8/n8command.go | 208 | | 0.0% | Command | n8/n8command.go | 217 | | 0.0% | SelectGame | n8/n8command.go | 228 | | 0.0% | getTestMapper | n8/n8command.go | 248 | | 0.0% | MakeDir | n8/n8command.go | 274 | | 0.0% | Halt | n8/n8command.go | 291 | | 0.0% | HaltExit | n8/n8command.go | 310 | | 0.0% | MapLoadSDC | n8/n8command.go | 323 | | 0.0% | Reboot | n8/n8command.go | 363 | | 0.0% | LoadOS | n8/n8command.go | 383 | | 0.0% | LoadGame | n8/n8command.go | 442 | | 0.0% | GetVdc | n8/n8command.go | 514 | | 0.0% | GetRtc | n8/n8command.go | 530 | | 0.0% | SetRtc | n8/n8command.go | 546 | | 0.0% | EnterServiceMode | n8/n8command.go | 566 | | 0.0% | ExitServiceMode | n8/n8command.go | 604 | | 0.0% | isServiceMode | n8/n8command.go | 636 | | 0.0% | Recovery | n8/n8command.go | 651 | | 0.0% | bootWait | n8/n8command.go | 717 | | 100.0% | FifoWr | n8/n8command.go | 750 | | 0.0% | MemoryCrc | n8/n8command.go | 758 | | 0.0% | MemorySet | n8/n8command.go | 787 | | 0.0% | MemoryTest | n8/n8command.go | 824 | | 0.0% | ReadFlash | n8/n8command.go | 854 | | 0.0% | ReadMemory | n8/n8command.go | 874 | | 0.0% | WriteFlash | n8/n8command.go | 927 | | 72.2% | WriteMemory | n8/n8command.go | 960 | | 0.0% | fpgaPostInit | n8/n8command.go | 994 | | 0.0% | FpgaInit | n8/n8command.go | 1016 | | 0.0% | FpgaInitFromFlash | n8/n8command.go | 1037 | | 0.0% | FpgaInitFromSD | n8/n8command.go | 1058 | | 0.0% | GetSerialConfig | n8/n8config.go | 46 | | 0.0% | GetMapIndex | n8/n8config.go | 53 | | 0.0% | GetSubmap | n8/n8config.go | 56 | | 0.0% | GetPrgSize | n8/n8config.go | 59 | | 0.0% | GetChrSize | n8/n8config.go | 62 | | 0.0% | GetSrmSize | n8/n8config.go | 65 | | 0.0% | GetMasterVol | n8/n8config.go | 68 | | 0.0% | GetSSKeyMenu | n8/n8config.go | 71 | | 0.0% | GetSSKeySave | n8/n8config.go | 74 | | 0.0% | GetSSKeyLoad | n8/n8config.go | 77 | | 0.0% | GetMapCfg | n8/n8config.go | 80 | | 0.0% | GetCtrl | n8/n8config.go | 83 | | 0.0% | NewMapConfigFromBinary | n8/n8config.go | 88 | | 0.0% | NewMapConfig | n8/n8config.go | 101 | | 0.0% | NewConfigFromNesRom | n8/n8config.go | 113 | | 0.0% | Parse | n8/n8config.go | 143 | | 0.0% | Serialize | n8/n8config.go | 157 | | 0.0% | PrintFull | n8/n8config.go | 174 | | 0.0% | Print | n8/n8config.go | 218 | | 0.0% | boolToYesNo | n8/n8config.go | 227 | | 0.0% | getMask | n8/n8config.go | 234 | | 0.0% | GetFileInfo | n8/n8files.go | 43 | | 0.0% | SetFileInfo | n8/n8files.go | 79 | | 0.0% | DirRead | n8/n8files.go | 90 | | 0.0% | GetDirRecords | n8/n8files.go | 127 | | 0.0% | FileCrc | n8/n8files.go | 176 | | 0.0% | OpenFile | n8/n8files.go | 208 | | 0.0% | CloseFile | n8/n8files.go | 228 | | 0.0% | FileSetPointer | n8/n8files.go | 249 | | 0.0% | DirOpen | n8/n8files.go | 274 | | 0.0% | DirLoad | n8/n8files.go | 299 | | 0.0% | GetDirSize | n8/n8files.go | 329 | | 0.0% | ReadFile | n8/n8files.go | 345 | | 0.0% | ReadFileFromMemory | n8/n8files.go | 389 | | 0.0% | FileWrite | n8/n8files.go | 436 | | 0.0% | FileWriteFromMemory | n8/n8files.go | 465 | | 0.0% | mkdir | n8/n8files.go | 509 | | 0.0% | DeleteRecord | n8/n8files.go | 538 | | 0.0% | DiskInit | n8/n8files.go | 569 | | 0.0% | DiskRead | n8/n8files.go | 591 | | 0.0% | changeExtension | n8/n8files.go | 633 | | 0.0% | NewVdc | n8/n8hardware.go | 28 | | 0.0% | GetVals | n8/n8hardware.go | 61 | | 0.0% | Print | n8/n8hardware.go | 70 | | 0.0% | NewRtcTime | n8/n8hardware.go | 77 | | 0.0% | NewRtcTimeFromSerial | n8/n8hardware.go | 89 | | 0.0% | decToHex | n8/n8hardware.go | 109 | | 100.0% | Read | n8/n8serial.go | 91 | | 100.0% | Write | n8/n8serial.go | 94 | | 100.0% | Close | n8/n8serial.go | 97 | | 100.0% | CloseSerial | n8/n8serial.go | 105 | | 71.4% | InitSerial | n8/n8serial.go | 115 | | 100.0% | TxData | n8/n8serial.go | 142 | | 100.0% | Tx8 | n8/n8serial.go | 158 | | 100.0% | Tx16 | n8/n8serial.go | 166 | | 100.0% | Tx32 | n8/n8serial.go | 174 | | 100.0% | TxCmd | n8/n8serial.go | 184 | | 100.0% | TxCmdExec | n8/n8serial.go | 205 | | 100.0% | TxString | n8/n8serial.go | 213 | | 100.0% | TxStringFifo | n8/n8serial.go | 230 | | 0.0% | TxDataACK | n8/n8serial.go | 247 | | 0.0% | RxData | n8/n8serial.go | 280 | | 0.0% | Rx8 | n8/n8serial.go | 304 | | 0.0% | Rx16 | n8/n8serial.go | 315 | | 0.0% | Rx32 | n8/n8serial.go | 326 | | 0.0% | RxString | n8/n8serial.go | 340 | | 0.0% | RxFileInfo | n8/n8serial.go | 357 | | 0.0% | GetStatus | n8/n8serial.go | 391 | | 0.0% | IsStatusOkay | n8/n8serial.go | 409 | ## Total Coverage: 6.1%
To make things easier to mock, I've consolidated the read/written bytes
into "serialBytes".
Updated tests
Some checks failed
Test / test (pull_request) Failing after 45s
9fea0bab93
Updated tests, error coverage
All checks were successful
Test / test (pull_request) Successful in 1m2s
2384778d5d
Coverage Function File Line
0.0% SendString n8/n8command.go 31
0.0% GetConfig n8/n8command.go 52
0.0% CopyFolder n8/n8command.go 66
0.0% getFiles n8/n8command.go 97
0.0% getDirectories n8/n8command.go 114
0.0% CopyFile n8/n8command.go 134
0.0% SetConfig n8/n8command.go 208
0.0% Command n8/n8command.go 217
0.0% SelectGame n8/n8command.go 228
0.0% getTestMapper n8/n8command.go 248
0.0% MakeDir n8/n8command.go 274
0.0% Halt n8/n8command.go 291
0.0% HaltExit n8/n8command.go 310
0.0% MapLoadSDC n8/n8command.go 323
0.0% Reboot n8/n8command.go 363
0.0% LoadOS n8/n8command.go 383
0.0% LoadGame n8/n8command.go 442
0.0% GetVdc n8/n8command.go 514
0.0% GetRtc n8/n8command.go 530
0.0% SetRtc n8/n8command.go 546
0.0% EnterServiceMode n8/n8command.go 566
0.0% ExitServiceMode n8/n8command.go 604
0.0% isServiceMode n8/n8command.go 636
0.0% Recovery n8/n8command.go 651
0.0% bootWait n8/n8command.go 717
100.0% FifoWr n8/n8command.go 750
0.0% MemoryCrc n8/n8command.go 758
0.0% MemorySet n8/n8command.go 787
0.0% MemoryTest n8/n8command.go 824
0.0% ReadFlash n8/n8command.go 854
0.0% ReadMemory n8/n8command.go 874
0.0% WriteFlash n8/n8command.go 927
72.2% WriteMemory n8/n8command.go 960
0.0% fpgaPostInit n8/n8command.go 994
0.0% FpgaInit n8/n8command.go 1016
0.0% FpgaInitFromFlash n8/n8command.go 1037
0.0% FpgaInitFromSD n8/n8command.go 1058
0.0% GetSerialConfig n8/n8config.go 46
0.0% GetMapIndex n8/n8config.go 53
0.0% GetSubmap n8/n8config.go 56
0.0% GetPrgSize n8/n8config.go 59
0.0% GetChrSize n8/n8config.go 62
0.0% GetSrmSize n8/n8config.go 65
0.0% GetMasterVol n8/n8config.go 68
0.0% GetSSKeyMenu n8/n8config.go 71
0.0% GetSSKeySave n8/n8config.go 74
0.0% GetSSKeyLoad n8/n8config.go 77
0.0% GetMapCfg n8/n8config.go 80
0.0% GetCtrl n8/n8config.go 83
0.0% NewMapConfigFromBinary n8/n8config.go 88
0.0% NewMapConfig n8/n8config.go 101
0.0% NewConfigFromNesRom n8/n8config.go 113
0.0% Parse n8/n8config.go 143
0.0% Serialize n8/n8config.go 157
0.0% PrintFull n8/n8config.go 174
0.0% Print n8/n8config.go 218
0.0% boolToYesNo n8/n8config.go 227
0.0% getMask n8/n8config.go 234
0.0% GetFileInfo n8/n8files.go 43
0.0% SetFileInfo n8/n8files.go 79
0.0% DirRead n8/n8files.go 90
0.0% GetDirRecords n8/n8files.go 127
0.0% FileCrc n8/n8files.go 176
0.0% OpenFile n8/n8files.go 208
0.0% CloseFile n8/n8files.go 228
0.0% FileSetPointer n8/n8files.go 249
0.0% DirOpen n8/n8files.go 274
0.0% DirLoad n8/n8files.go 299
0.0% GetDirSize n8/n8files.go 329
0.0% ReadFile n8/n8files.go 345
0.0% ReadFileFromMemory n8/n8files.go 389
0.0% FileWrite n8/n8files.go 436
0.0% FileWriteFromMemory n8/n8files.go 465
0.0% mkdir n8/n8files.go 509
0.0% DeleteRecord n8/n8files.go 538
0.0% DiskInit n8/n8files.go 569
0.0% DiskRead n8/n8files.go 591
0.0% changeExtension n8/n8files.go 633
0.0% NewVdc n8/n8hardware.go 28
0.0% GetVals n8/n8hardware.go 61
0.0% Print n8/n8hardware.go 70
0.0% NewRtcTime n8/n8hardware.go 77
0.0% NewRtcTimeFromSerial n8/n8hardware.go 89
0.0% decToHex n8/n8hardware.go 109
100.0% Read n8/n8serial.go 91
100.0% Write n8/n8serial.go 94
100.0% Close n8/n8serial.go 97
100.0% CloseSerial n8/n8serial.go 105
71.4% InitSerial n8/n8serial.go 115
100.0% TxData n8/n8serial.go 142
100.0% Tx8 n8/n8serial.go 158
100.0% Tx16 n8/n8serial.go 166
100.0% Tx32 n8/n8serial.go 174
100.0% TxCmd n8/n8serial.go 184
100.0% TxCmdExec n8/n8serial.go 205
100.0% TxString n8/n8serial.go 213
100.0% TxStringFifo n8/n8serial.go 230
92.9% TxDataAck n8/n8serial.go 247
100.0% RxData n8/n8serial.go 279
100.0% Rx8 n8/n8serial.go 306
100.0% Rx16 n8/n8serial.go 317
100.0% Rx32 n8/n8serial.go 328
100.0% RxString n8/n8serial.go 342
100.0% RxFileInfo n8/n8serial.go 364
100.0% GetStatus n8/n8serial.go 398
0.0% IsStatusOkay n8/n8serial.go 420

Total Coverage: 13.2%

| Coverage | Function | File | Line | | --- | --- | --- | --- | | 0.0% | SendString | n8/n8command.go | 31 | | 0.0% | GetConfig | n8/n8command.go | 52 | | 0.0% | CopyFolder | n8/n8command.go | 66 | | 0.0% | getFiles | n8/n8command.go | 97 | | 0.0% | getDirectories | n8/n8command.go | 114 | | 0.0% | CopyFile | n8/n8command.go | 134 | | 0.0% | SetConfig | n8/n8command.go | 208 | | 0.0% | Command | n8/n8command.go | 217 | | 0.0% | SelectGame | n8/n8command.go | 228 | | 0.0% | getTestMapper | n8/n8command.go | 248 | | 0.0% | MakeDir | n8/n8command.go | 274 | | 0.0% | Halt | n8/n8command.go | 291 | | 0.0% | HaltExit | n8/n8command.go | 310 | | 0.0% | MapLoadSDC | n8/n8command.go | 323 | | 0.0% | Reboot | n8/n8command.go | 363 | | 0.0% | LoadOS | n8/n8command.go | 383 | | 0.0% | LoadGame | n8/n8command.go | 442 | | 0.0% | GetVdc | n8/n8command.go | 514 | | 0.0% | GetRtc | n8/n8command.go | 530 | | 0.0% | SetRtc | n8/n8command.go | 546 | | 0.0% | EnterServiceMode | n8/n8command.go | 566 | | 0.0% | ExitServiceMode | n8/n8command.go | 604 | | 0.0% | isServiceMode | n8/n8command.go | 636 | | 0.0% | Recovery | n8/n8command.go | 651 | | 0.0% | bootWait | n8/n8command.go | 717 | | 100.0% | FifoWr | n8/n8command.go | 750 | | 0.0% | MemoryCrc | n8/n8command.go | 758 | | 0.0% | MemorySet | n8/n8command.go | 787 | | 0.0% | MemoryTest | n8/n8command.go | 824 | | 0.0% | ReadFlash | n8/n8command.go | 854 | | 0.0% | ReadMemory | n8/n8command.go | 874 | | 0.0% | WriteFlash | n8/n8command.go | 927 | | 72.2% | WriteMemory | n8/n8command.go | 960 | | 0.0% | fpgaPostInit | n8/n8command.go | 994 | | 0.0% | FpgaInit | n8/n8command.go | 1016 | | 0.0% | FpgaInitFromFlash | n8/n8command.go | 1037 | | 0.0% | FpgaInitFromSD | n8/n8command.go | 1058 | | 0.0% | GetSerialConfig | n8/n8config.go | 46 | | 0.0% | GetMapIndex | n8/n8config.go | 53 | | 0.0% | GetSubmap | n8/n8config.go | 56 | | 0.0% | GetPrgSize | n8/n8config.go | 59 | | 0.0% | GetChrSize | n8/n8config.go | 62 | | 0.0% | GetSrmSize | n8/n8config.go | 65 | | 0.0% | GetMasterVol | n8/n8config.go | 68 | | 0.0% | GetSSKeyMenu | n8/n8config.go | 71 | | 0.0% | GetSSKeySave | n8/n8config.go | 74 | | 0.0% | GetSSKeyLoad | n8/n8config.go | 77 | | 0.0% | GetMapCfg | n8/n8config.go | 80 | | 0.0% | GetCtrl | n8/n8config.go | 83 | | 0.0% | NewMapConfigFromBinary | n8/n8config.go | 88 | | 0.0% | NewMapConfig | n8/n8config.go | 101 | | 0.0% | NewConfigFromNesRom | n8/n8config.go | 113 | | 0.0% | Parse | n8/n8config.go | 143 | | 0.0% | Serialize | n8/n8config.go | 157 | | 0.0% | PrintFull | n8/n8config.go | 174 | | 0.0% | Print | n8/n8config.go | 218 | | 0.0% | boolToYesNo | n8/n8config.go | 227 | | 0.0% | getMask | n8/n8config.go | 234 | | 0.0% | GetFileInfo | n8/n8files.go | 43 | | 0.0% | SetFileInfo | n8/n8files.go | 79 | | 0.0% | DirRead | n8/n8files.go | 90 | | 0.0% | GetDirRecords | n8/n8files.go | 127 | | 0.0% | FileCrc | n8/n8files.go | 176 | | 0.0% | OpenFile | n8/n8files.go | 208 | | 0.0% | CloseFile | n8/n8files.go | 228 | | 0.0% | FileSetPointer | n8/n8files.go | 249 | | 0.0% | DirOpen | n8/n8files.go | 274 | | 0.0% | DirLoad | n8/n8files.go | 299 | | 0.0% | GetDirSize | n8/n8files.go | 329 | | 0.0% | ReadFile | n8/n8files.go | 345 | | 0.0% | ReadFileFromMemory | n8/n8files.go | 389 | | 0.0% | FileWrite | n8/n8files.go | 436 | | 0.0% | FileWriteFromMemory | n8/n8files.go | 465 | | 0.0% | mkdir | n8/n8files.go | 509 | | 0.0% | DeleteRecord | n8/n8files.go | 538 | | 0.0% | DiskInit | n8/n8files.go | 569 | | 0.0% | DiskRead | n8/n8files.go | 591 | | 0.0% | changeExtension | n8/n8files.go | 633 | | 0.0% | NewVdc | n8/n8hardware.go | 28 | | 0.0% | GetVals | n8/n8hardware.go | 61 | | 0.0% | Print | n8/n8hardware.go | 70 | | 0.0% | NewRtcTime | n8/n8hardware.go | 77 | | 0.0% | NewRtcTimeFromSerial | n8/n8hardware.go | 89 | | 0.0% | decToHex | n8/n8hardware.go | 109 | | 100.0% | Read | n8/n8serial.go | 91 | | 100.0% | Write | n8/n8serial.go | 94 | | 100.0% | Close | n8/n8serial.go | 97 | | 100.0% | CloseSerial | n8/n8serial.go | 105 | | 71.4% | InitSerial | n8/n8serial.go | 115 | | 100.0% | TxData | n8/n8serial.go | 142 | | 100.0% | Tx8 | n8/n8serial.go | 158 | | 100.0% | Tx16 | n8/n8serial.go | 166 | | 100.0% | Tx32 | n8/n8serial.go | 174 | | 100.0% | TxCmd | n8/n8serial.go | 184 | | 100.0% | TxCmdExec | n8/n8serial.go | 205 | | 100.0% | TxString | n8/n8serial.go | 213 | | 100.0% | TxStringFifo | n8/n8serial.go | 230 | | 92.9% | TxDataAck | n8/n8serial.go | 247 | | 100.0% | RxData | n8/n8serial.go | 279 | | 100.0% | Rx8 | n8/n8serial.go | 306 | | 100.0% | Rx16 | n8/n8serial.go | 317 | | 100.0% | Rx32 | n8/n8serial.go | 328 | | 100.0% | RxString | n8/n8serial.go | 342 | | 100.0% | RxFileInfo | n8/n8serial.go | 364 | | 100.0% | GetStatus | n8/n8serial.go | 398 | | 0.0% | IsStatusOkay | n8/n8serial.go | 420 | ## Total Coverage: 13.2%
Coverage Function File Line
0.0% SendString n8/n8command.go 31
0.0% GetConfig n8/n8command.go 52
0.0% CopyFolder n8/n8command.go 66
0.0% getFiles n8/n8command.go 97
0.0% getDirectories n8/n8command.go 114
0.0% CopyFile n8/n8command.go 134
0.0% SetConfig n8/n8command.go 208
0.0% Command n8/n8command.go 217
0.0% SelectGame n8/n8command.go 228
0.0% getTestMapper n8/n8command.go 248
0.0% MakeDir n8/n8command.go 274
0.0% Halt n8/n8command.go 291
0.0% HaltExit n8/n8command.go 310
0.0% MapLoadSDC n8/n8command.go 323
0.0% Reboot n8/n8command.go 363
0.0% LoadOS n8/n8command.go 383
0.0% LoadGame n8/n8command.go 442
0.0% GetVdc n8/n8command.go 514
0.0% GetRtc n8/n8command.go 530
0.0% SetRtc n8/n8command.go 546
0.0% EnterServiceMode n8/n8command.go 566
0.0% ExitServiceMode n8/n8command.go 604
0.0% isServiceMode n8/n8command.go 636
0.0% Recovery n8/n8command.go 651
0.0% bootWait n8/n8command.go 717
100.0% FifoWr n8/n8command.go 750
0.0% MemoryCrc n8/n8command.go 758
0.0% MemorySet n8/n8command.go 787
0.0% MemoryTest n8/n8command.go 824
0.0% ReadFlash n8/n8command.go 854
0.0% ReadMemory n8/n8command.go 874
0.0% WriteFlash n8/n8command.go 927
72.2% WriteMemory n8/n8command.go 960
0.0% fpgaPostInit n8/n8command.go 994
0.0% FpgaInit n8/n8command.go 1016
0.0% FpgaInitFromFlash n8/n8command.go 1037
0.0% FpgaInitFromSD n8/n8command.go 1058
0.0% GetSerialConfig n8/n8config.go 46
0.0% GetMapIndex n8/n8config.go 53
0.0% GetSubmap n8/n8config.go 56
0.0% GetPrgSize n8/n8config.go 59
0.0% GetChrSize n8/n8config.go 62
0.0% GetSrmSize n8/n8config.go 65
0.0% GetMasterVol n8/n8config.go 68
0.0% GetSSKeyMenu n8/n8config.go 71
0.0% GetSSKeySave n8/n8config.go 74
0.0% GetSSKeyLoad n8/n8config.go 77
0.0% GetMapCfg n8/n8config.go 80
0.0% GetCtrl n8/n8config.go 83
0.0% NewMapConfigFromBinary n8/n8config.go 88
0.0% NewMapConfig n8/n8config.go 101
0.0% NewConfigFromNesRom n8/n8config.go 113
0.0% Parse n8/n8config.go 143
0.0% Serialize n8/n8config.go 157
0.0% PrintFull n8/n8config.go 174
0.0% Print n8/n8config.go 218
0.0% boolToYesNo n8/n8config.go 227
0.0% getMask n8/n8config.go 234
0.0% GetFileInfo n8/n8files.go 43
0.0% SetFileInfo n8/n8files.go 79
0.0% DirRead n8/n8files.go 90
0.0% GetDirRecords n8/n8files.go 127
0.0% FileCrc n8/n8files.go 176
0.0% OpenFile n8/n8files.go 208
0.0% CloseFile n8/n8files.go 228
0.0% FileSetPointer n8/n8files.go 249
0.0% DirOpen n8/n8files.go 274
0.0% DirLoad n8/n8files.go 299
0.0% GetDirSize n8/n8files.go 329
0.0% ReadFile n8/n8files.go 345
0.0% ReadFileFromMemory n8/n8files.go 389
0.0% FileWrite n8/n8files.go 436
0.0% FileWriteFromMemory n8/n8files.go 465
0.0% mkdir n8/n8files.go 509
0.0% DeleteRecord n8/n8files.go 538
0.0% DiskInit n8/n8files.go 569
0.0% DiskRead n8/n8files.go 591
0.0% changeExtension n8/n8files.go 633
100.0% NewVdc n8/n8hardware.go 28
100.0% GetVals n8/n8hardware.go 61
0.0% Print n8/n8hardware.go 70
100.0% NewRtcTime n8/n8hardware.go 77
100.0% NewRtcTimeFromSerial n8/n8hardware.go 89
100.0% decToHex n8/n8hardware.go 110
100.0% Read n8/n8serial.go 91
100.0% Write n8/n8serial.go 94
100.0% Close n8/n8serial.go 97
100.0% CloseSerial n8/n8serial.go 105
71.4% InitSerial n8/n8serial.go 115
100.0% TxData n8/n8serial.go 142
100.0% Tx8 n8/n8serial.go 158
100.0% Tx16 n8/n8serial.go 166
100.0% Tx32 n8/n8serial.go 174
100.0% TxCmd n8/n8serial.go 184
100.0% TxCmdExec n8/n8serial.go 205
100.0% TxString n8/n8serial.go 213
100.0% TxStringFifo n8/n8serial.go 230
92.9% TxDataAck n8/n8serial.go 247
100.0% RxData n8/n8serial.go 279
100.0% Rx8 n8/n8serial.go 306
100.0% Rx16 n8/n8serial.go 317
100.0% Rx32 n8/n8serial.go 328
100.0% RxString n8/n8serial.go 342
100.0% RxFileInfo n8/n8serial.go 364
100.0% GetStatus n8/n8serial.go 398
83.3% IsStatusOkay n8/n8serial.go 420

Total Coverage: 15.1%

| Coverage | Function | File | Line | | --- | --- | --- | --- | | 0.0% | SendString | n8/n8command.go | 31 | | 0.0% | GetConfig | n8/n8command.go | 52 | | 0.0% | CopyFolder | n8/n8command.go | 66 | | 0.0% | getFiles | n8/n8command.go | 97 | | 0.0% | getDirectories | n8/n8command.go | 114 | | 0.0% | CopyFile | n8/n8command.go | 134 | | 0.0% | SetConfig | n8/n8command.go | 208 | | 0.0% | Command | n8/n8command.go | 217 | | 0.0% | SelectGame | n8/n8command.go | 228 | | 0.0% | getTestMapper | n8/n8command.go | 248 | | 0.0% | MakeDir | n8/n8command.go | 274 | | 0.0% | Halt | n8/n8command.go | 291 | | 0.0% | HaltExit | n8/n8command.go | 310 | | 0.0% | MapLoadSDC | n8/n8command.go | 323 | | 0.0% | Reboot | n8/n8command.go | 363 | | 0.0% | LoadOS | n8/n8command.go | 383 | | 0.0% | LoadGame | n8/n8command.go | 442 | | 0.0% | GetVdc | n8/n8command.go | 514 | | 0.0% | GetRtc | n8/n8command.go | 530 | | 0.0% | SetRtc | n8/n8command.go | 546 | | 0.0% | EnterServiceMode | n8/n8command.go | 566 | | 0.0% | ExitServiceMode | n8/n8command.go | 604 | | 0.0% | isServiceMode | n8/n8command.go | 636 | | 0.0% | Recovery | n8/n8command.go | 651 | | 0.0% | bootWait | n8/n8command.go | 717 | | 100.0% | FifoWr | n8/n8command.go | 750 | | 0.0% | MemoryCrc | n8/n8command.go | 758 | | 0.0% | MemorySet | n8/n8command.go | 787 | | 0.0% | MemoryTest | n8/n8command.go | 824 | | 0.0% | ReadFlash | n8/n8command.go | 854 | | 0.0% | ReadMemory | n8/n8command.go | 874 | | 0.0% | WriteFlash | n8/n8command.go | 927 | | 72.2% | WriteMemory | n8/n8command.go | 960 | | 0.0% | fpgaPostInit | n8/n8command.go | 994 | | 0.0% | FpgaInit | n8/n8command.go | 1016 | | 0.0% | FpgaInitFromFlash | n8/n8command.go | 1037 | | 0.0% | FpgaInitFromSD | n8/n8command.go | 1058 | | 0.0% | GetSerialConfig | n8/n8config.go | 46 | | 0.0% | GetMapIndex | n8/n8config.go | 53 | | 0.0% | GetSubmap | n8/n8config.go | 56 | | 0.0% | GetPrgSize | n8/n8config.go | 59 | | 0.0% | GetChrSize | n8/n8config.go | 62 | | 0.0% | GetSrmSize | n8/n8config.go | 65 | | 0.0% | GetMasterVol | n8/n8config.go | 68 | | 0.0% | GetSSKeyMenu | n8/n8config.go | 71 | | 0.0% | GetSSKeySave | n8/n8config.go | 74 | | 0.0% | GetSSKeyLoad | n8/n8config.go | 77 | | 0.0% | GetMapCfg | n8/n8config.go | 80 | | 0.0% | GetCtrl | n8/n8config.go | 83 | | 0.0% | NewMapConfigFromBinary | n8/n8config.go | 88 | | 0.0% | NewMapConfig | n8/n8config.go | 101 | | 0.0% | NewConfigFromNesRom | n8/n8config.go | 113 | | 0.0% | Parse | n8/n8config.go | 143 | | 0.0% | Serialize | n8/n8config.go | 157 | | 0.0% | PrintFull | n8/n8config.go | 174 | | 0.0% | Print | n8/n8config.go | 218 | | 0.0% | boolToYesNo | n8/n8config.go | 227 | | 0.0% | getMask | n8/n8config.go | 234 | | 0.0% | GetFileInfo | n8/n8files.go | 43 | | 0.0% | SetFileInfo | n8/n8files.go | 79 | | 0.0% | DirRead | n8/n8files.go | 90 | | 0.0% | GetDirRecords | n8/n8files.go | 127 | | 0.0% | FileCrc | n8/n8files.go | 176 | | 0.0% | OpenFile | n8/n8files.go | 208 | | 0.0% | CloseFile | n8/n8files.go | 228 | | 0.0% | FileSetPointer | n8/n8files.go | 249 | | 0.0% | DirOpen | n8/n8files.go | 274 | | 0.0% | DirLoad | n8/n8files.go | 299 | | 0.0% | GetDirSize | n8/n8files.go | 329 | | 0.0% | ReadFile | n8/n8files.go | 345 | | 0.0% | ReadFileFromMemory | n8/n8files.go | 389 | | 0.0% | FileWrite | n8/n8files.go | 436 | | 0.0% | FileWriteFromMemory | n8/n8files.go | 465 | | 0.0% | mkdir | n8/n8files.go | 509 | | 0.0% | DeleteRecord | n8/n8files.go | 538 | | 0.0% | DiskInit | n8/n8files.go | 569 | | 0.0% | DiskRead | n8/n8files.go | 591 | | 0.0% | changeExtension | n8/n8files.go | 633 | | 100.0% | NewVdc | n8/n8hardware.go | 28 | | 100.0% | GetVals | n8/n8hardware.go | 61 | | 0.0% | Print | n8/n8hardware.go | 70 | | 100.0% | NewRtcTime | n8/n8hardware.go | 77 | | 100.0% | NewRtcTimeFromSerial | n8/n8hardware.go | 89 | | 100.0% | decToHex | n8/n8hardware.go | 110 | | 100.0% | Read | n8/n8serial.go | 91 | | 100.0% | Write | n8/n8serial.go | 94 | | 100.0% | Close | n8/n8serial.go | 97 | | 100.0% | CloseSerial | n8/n8serial.go | 105 | | 71.4% | InitSerial | n8/n8serial.go | 115 | | 100.0% | TxData | n8/n8serial.go | 142 | | 100.0% | Tx8 | n8/n8serial.go | 158 | | 100.0% | Tx16 | n8/n8serial.go | 166 | | 100.0% | Tx32 | n8/n8serial.go | 174 | | 100.0% | TxCmd | n8/n8serial.go | 184 | | 100.0% | TxCmdExec | n8/n8serial.go | 205 | | 100.0% | TxString | n8/n8serial.go | 213 | | 100.0% | TxStringFifo | n8/n8serial.go | 230 | | 92.9% | TxDataAck | n8/n8serial.go | 247 | | 100.0% | RxData | n8/n8serial.go | 279 | | 100.0% | Rx8 | n8/n8serial.go | 306 | | 100.0% | Rx16 | n8/n8serial.go | 317 | | 100.0% | Rx32 | n8/n8serial.go | 328 | | 100.0% | RxString | n8/n8serial.go | 342 | | 100.0% | RxFileInfo | n8/n8serial.go | 364 | | 100.0% | GetStatus | n8/n8serial.go | 398 | | 83.3% | IsStatusOkay | n8/n8serial.go | 420 | ## Total Coverage: 15.1%
Adding initial tests for n8command.go
Some checks failed
Test / test (pull_request) Failing after 54s
3e9520e277
Fixed TestGetConfig/serial_fail_on_read wanrErr
All checks were successful
Test / test (pull_request) Successful in 58s
70bbf0663d
Coverage Function File Line
100.0% SendString n8/n8command.go 31
100.0% GetConfig n8/n8command.go 52
0.0% CopyFolder n8/n8command.go 66
0.0% getFiles n8/n8command.go 97
0.0% getDirectories n8/n8command.go 114
0.0% CopyFile n8/n8command.go 134
0.0% SetConfig n8/n8command.go 208
0.0% Command n8/n8command.go 217
0.0% SelectGame n8/n8command.go 228
0.0% getTestMapper n8/n8command.go 248
0.0% MakeDir n8/n8command.go 274
0.0% Halt n8/n8command.go 291
0.0% HaltExit n8/n8command.go 310
0.0% MapLoadSDC n8/n8command.go 323
0.0% Reboot n8/n8command.go 363
0.0% LoadOS n8/n8command.go 383
0.0% LoadGame n8/n8command.go 442
0.0% GetVdc n8/n8command.go 514
0.0% GetRtc n8/n8command.go 530
0.0% SetRtc n8/n8command.go 546
0.0% EnterServiceMode n8/n8command.go 566
0.0% ExitServiceMode n8/n8command.go 604
0.0% isServiceMode n8/n8command.go 636
0.0% Recovery n8/n8command.go 651
0.0% bootWait n8/n8command.go 717
100.0% FifoWr n8/n8command.go 750
0.0% MemoryCrc n8/n8command.go 758
0.0% MemorySet n8/n8command.go 787
0.0% MemoryTest n8/n8command.go 824
0.0% ReadFlash n8/n8command.go 854
82.1% ReadMemory n8/n8command.go 874
0.0% WriteFlash n8/n8command.go 927
77.8% WriteMemory n8/n8command.go 960
0.0% fpgaPostInit n8/n8command.go 994
0.0% FpgaInit n8/n8command.go 1016
0.0% FpgaInitFromFlash n8/n8command.go 1037
0.0% FpgaInitFromSD n8/n8command.go 1058
66.7% GetSerialConfig n8/n8config.go 46
100.0% GetMapIndex n8/n8config.go 53
0.0% GetSubmap n8/n8config.go 56
100.0% GetPrgSize n8/n8config.go 59
100.0% GetChrSize n8/n8config.go 62
100.0% GetSrmSize n8/n8config.go 65
100.0% GetMasterVol n8/n8config.go 68
100.0% GetSSKeyMenu n8/n8config.go 71
100.0% GetSSKeySave n8/n8config.go 74
100.0% GetSSKeyLoad n8/n8config.go 77
100.0% GetMapCfg n8/n8config.go 80
100.0% GetCtrl n8/n8config.go 83
100.0% NewMapConfigFromBinary n8/n8config.go 88
100.0% NewMapConfig n8/n8config.go 101
0.0% NewConfigFromNesRom n8/n8config.go 113
100.0% Parse n8/n8config.go 143
0.0% Serialize n8/n8config.go 157
0.0% PrintFull n8/n8config.go 174
0.0% Print n8/n8config.go 218
0.0% boolToYesNo n8/n8config.go 227
0.0% getMask n8/n8config.go 234
0.0% GetFileInfo n8/n8files.go 43
0.0% SetFileInfo n8/n8files.go 79
0.0% DirRead n8/n8files.go 90
0.0% GetDirRecords n8/n8files.go 127
0.0% FileCrc n8/n8files.go 176
0.0% OpenFile n8/n8files.go 208
0.0% CloseFile n8/n8files.go 228
0.0% FileSetPointer n8/n8files.go 249
0.0% DirOpen n8/n8files.go 274
0.0% DirLoad n8/n8files.go 299
0.0% GetDirSize n8/n8files.go 329
0.0% ReadFile n8/n8files.go 345
0.0% ReadFileFromMemory n8/n8files.go 389
0.0% FileWrite n8/n8files.go 436
0.0% FileWriteFromMemory n8/n8files.go 465
0.0% mkdir n8/n8files.go 509
0.0% DeleteRecord n8/n8files.go 538
0.0% DiskInit n8/n8files.go 569
0.0% DiskRead n8/n8files.go 591
0.0% changeExtension n8/n8files.go 633
100.0% NewVdc n8/n8hardware.go 28
100.0% GetVals n8/n8hardware.go 61
0.0% Print n8/n8hardware.go 70
100.0% NewRtcTime n8/n8hardware.go 77
100.0% NewRtcTimeFromSerial n8/n8hardware.go 89
100.0% decToHex n8/n8hardware.go 110
100.0% Read n8/n8serial.go 91
100.0% Write n8/n8serial.go 94
100.0% Close n8/n8serial.go 97
100.0% CloseSerial n8/n8serial.go 105
71.4% InitSerial n8/n8serial.go 115
100.0% TxData n8/n8serial.go 142
100.0% Tx8 n8/n8serial.go 158
100.0% Tx16 n8/n8serial.go 166
100.0% Tx32 n8/n8serial.go 174
100.0% TxCmd n8/n8serial.go 184
100.0% TxCmdExec n8/n8serial.go 205
100.0% TxString n8/n8serial.go 213
100.0% TxStringFifo n8/n8serial.go 230
92.9% TxDataAck n8/n8serial.go 247
100.0% RxData n8/n8serial.go 279
100.0% Rx8 n8/n8serial.go 307
100.0% Rx16 n8/n8serial.go 318
100.0% Rx32 n8/n8serial.go 329
100.0% RxString n8/n8serial.go 343
100.0% RxFileInfo n8/n8serial.go 365
100.0% GetStatus n8/n8serial.go 399
83.3% IsStatusOkay n8/n8serial.go 421

Total Coverage: 21.3%

| Coverage | Function | File | Line | | --- | --- | --- | --- | | 100.0% | SendString | n8/n8command.go | 31 | | 100.0% | GetConfig | n8/n8command.go | 52 | | 0.0% | CopyFolder | n8/n8command.go | 66 | | 0.0% | getFiles | n8/n8command.go | 97 | | 0.0% | getDirectories | n8/n8command.go | 114 | | 0.0% | CopyFile | n8/n8command.go | 134 | | 0.0% | SetConfig | n8/n8command.go | 208 | | 0.0% | Command | n8/n8command.go | 217 | | 0.0% | SelectGame | n8/n8command.go | 228 | | 0.0% | getTestMapper | n8/n8command.go | 248 | | 0.0% | MakeDir | n8/n8command.go | 274 | | 0.0% | Halt | n8/n8command.go | 291 | | 0.0% | HaltExit | n8/n8command.go | 310 | | 0.0% | MapLoadSDC | n8/n8command.go | 323 | | 0.0% | Reboot | n8/n8command.go | 363 | | 0.0% | LoadOS | n8/n8command.go | 383 | | 0.0% | LoadGame | n8/n8command.go | 442 | | 0.0% | GetVdc | n8/n8command.go | 514 | | 0.0% | GetRtc | n8/n8command.go | 530 | | 0.0% | SetRtc | n8/n8command.go | 546 | | 0.0% | EnterServiceMode | n8/n8command.go | 566 | | 0.0% | ExitServiceMode | n8/n8command.go | 604 | | 0.0% | isServiceMode | n8/n8command.go | 636 | | 0.0% | Recovery | n8/n8command.go | 651 | | 0.0% | bootWait | n8/n8command.go | 717 | | 100.0% | FifoWr | n8/n8command.go | 750 | | 0.0% | MemoryCrc | n8/n8command.go | 758 | | 0.0% | MemorySet | n8/n8command.go | 787 | | 0.0% | MemoryTest | n8/n8command.go | 824 | | 0.0% | ReadFlash | n8/n8command.go | 854 | | 82.1% | ReadMemory | n8/n8command.go | 874 | | 0.0% | WriteFlash | n8/n8command.go | 927 | | 77.8% | WriteMemory | n8/n8command.go | 960 | | 0.0% | fpgaPostInit | n8/n8command.go | 994 | | 0.0% | FpgaInit | n8/n8command.go | 1016 | | 0.0% | FpgaInitFromFlash | n8/n8command.go | 1037 | | 0.0% | FpgaInitFromSD | n8/n8command.go | 1058 | | 66.7% | GetSerialConfig | n8/n8config.go | 46 | | 100.0% | GetMapIndex | n8/n8config.go | 53 | | 0.0% | GetSubmap | n8/n8config.go | 56 | | 100.0% | GetPrgSize | n8/n8config.go | 59 | | 100.0% | GetChrSize | n8/n8config.go | 62 | | 100.0% | GetSrmSize | n8/n8config.go | 65 | | 100.0% | GetMasterVol | n8/n8config.go | 68 | | 100.0% | GetSSKeyMenu | n8/n8config.go | 71 | | 100.0% | GetSSKeySave | n8/n8config.go | 74 | | 100.0% | GetSSKeyLoad | n8/n8config.go | 77 | | 100.0% | GetMapCfg | n8/n8config.go | 80 | | 100.0% | GetCtrl | n8/n8config.go | 83 | | 100.0% | NewMapConfigFromBinary | n8/n8config.go | 88 | | 100.0% | NewMapConfig | n8/n8config.go | 101 | | 0.0% | NewConfigFromNesRom | n8/n8config.go | 113 | | 100.0% | Parse | n8/n8config.go | 143 | | 0.0% | Serialize | n8/n8config.go | 157 | | 0.0% | PrintFull | n8/n8config.go | 174 | | 0.0% | Print | n8/n8config.go | 218 | | 0.0% | boolToYesNo | n8/n8config.go | 227 | | 0.0% | getMask | n8/n8config.go | 234 | | 0.0% | GetFileInfo | n8/n8files.go | 43 | | 0.0% | SetFileInfo | n8/n8files.go | 79 | | 0.0% | DirRead | n8/n8files.go | 90 | | 0.0% | GetDirRecords | n8/n8files.go | 127 | | 0.0% | FileCrc | n8/n8files.go | 176 | | 0.0% | OpenFile | n8/n8files.go | 208 | | 0.0% | CloseFile | n8/n8files.go | 228 | | 0.0% | FileSetPointer | n8/n8files.go | 249 | | 0.0% | DirOpen | n8/n8files.go | 274 | | 0.0% | DirLoad | n8/n8files.go | 299 | | 0.0% | GetDirSize | n8/n8files.go | 329 | | 0.0% | ReadFile | n8/n8files.go | 345 | | 0.0% | ReadFileFromMemory | n8/n8files.go | 389 | | 0.0% | FileWrite | n8/n8files.go | 436 | | 0.0% | FileWriteFromMemory | n8/n8files.go | 465 | | 0.0% | mkdir | n8/n8files.go | 509 | | 0.0% | DeleteRecord | n8/n8files.go | 538 | | 0.0% | DiskInit | n8/n8files.go | 569 | | 0.0% | DiskRead | n8/n8files.go | 591 | | 0.0% | changeExtension | n8/n8files.go | 633 | | 100.0% | NewVdc | n8/n8hardware.go | 28 | | 100.0% | GetVals | n8/n8hardware.go | 61 | | 0.0% | Print | n8/n8hardware.go | 70 | | 100.0% | NewRtcTime | n8/n8hardware.go | 77 | | 100.0% | NewRtcTimeFromSerial | n8/n8hardware.go | 89 | | 100.0% | decToHex | n8/n8hardware.go | 110 | | 100.0% | Read | n8/n8serial.go | 91 | | 100.0% | Write | n8/n8serial.go | 94 | | 100.0% | Close | n8/n8serial.go | 97 | | 100.0% | CloseSerial | n8/n8serial.go | 105 | | 71.4% | InitSerial | n8/n8serial.go | 115 | | 100.0% | TxData | n8/n8serial.go | 142 | | 100.0% | Tx8 | n8/n8serial.go | 158 | | 100.0% | Tx16 | n8/n8serial.go | 166 | | 100.0% | Tx32 | n8/n8serial.go | 174 | | 100.0% | TxCmd | n8/n8serial.go | 184 | | 100.0% | TxCmdExec | n8/n8serial.go | 205 | | 100.0% | TxString | n8/n8serial.go | 213 | | 100.0% | TxStringFifo | n8/n8serial.go | 230 | | 92.9% | TxDataAck | n8/n8serial.go | 247 | | 100.0% | RxData | n8/n8serial.go | 279 | | 100.0% | Rx8 | n8/n8serial.go | 307 | | 100.0% | Rx16 | n8/n8serial.go | 318 | | 100.0% | Rx32 | n8/n8serial.go | 329 | | 100.0% | RxString | n8/n8serial.go | 343 | | 100.0% | RxFileInfo | n8/n8serial.go | 365 | | 100.0% | GetStatus | n8/n8serial.go | 399 | | 83.3% | IsStatusOkay | n8/n8serial.go | 421 | ## Total Coverage: 21.3%
Further n8commands tests
All checks were successful
Test / test (pull_request) Successful in 2m15s
c7b7e4eeb0
Coverage Function File Line
100.0% SendString n8/n8command.go 31
100.0% GetConfig n8/n8command.go 52
64.7% CopyFolder n8/n8command.go 66
87.5% getFiles n8/n8command.go 97
75.0% getDirectories n8/n8command.go 114
48.8% CopyFile n8/n8command.go 134
100.0% SetConfig n8/n8command.go 208
0.0% Command n8/n8command.go 217
0.0% SelectGame n8/n8command.go 228
0.0% getTestMapper n8/n8command.go 248
0.0% MakeDir n8/n8command.go 274
0.0% Halt n8/n8command.go 291
0.0% HaltExit n8/n8command.go 310
0.0% MapLoadSDC n8/n8command.go 323
0.0% Reboot n8/n8command.go 363
0.0% LoadOS n8/n8command.go 383
0.0% LoadGame n8/n8command.go 442
0.0% GetVdc n8/n8command.go 514
0.0% GetRtc n8/n8command.go 530
0.0% SetRtc n8/n8command.go 546
0.0% EnterServiceMode n8/n8command.go 566
0.0% ExitServiceMode n8/n8command.go 604
0.0% isServiceMode n8/n8command.go 636
0.0% Recovery n8/n8command.go 651
0.0% bootWait n8/n8command.go 717
100.0% FifoWr n8/n8command.go 750
0.0% MemoryCrc n8/n8command.go 758
0.0% MemorySet n8/n8command.go 787
0.0% MemoryTest n8/n8command.go 824
0.0% ReadFlash n8/n8command.go 854
82.1% ReadMemory n8/n8command.go 874
0.0% WriteFlash n8/n8command.go 927
77.8% WriteMemory n8/n8command.go 960
0.0% fpgaPostInit n8/n8command.go 994
0.0% FpgaInit n8/n8command.go 1016
0.0% FpgaInitFromFlash n8/n8command.go 1037
0.0% FpgaInitFromSD n8/n8command.go 1058
66.7% GetSerialConfig n8/n8config.go 46
100.0% GetMapIndex n8/n8config.go 53
0.0% GetSubmap n8/n8config.go 56
100.0% GetPrgSize n8/n8config.go 59
100.0% GetChrSize n8/n8config.go 62
100.0% GetSrmSize n8/n8config.go 65
100.0% GetMasterVol n8/n8config.go 68
100.0% GetSSKeyMenu n8/n8config.go 71
100.0% GetSSKeySave n8/n8config.go 74
100.0% GetSSKeyLoad n8/n8config.go 77
100.0% GetMapCfg n8/n8config.go 80
100.0% GetCtrl n8/n8config.go 83
100.0% NewMapConfigFromBinary n8/n8config.go 88
100.0% NewMapConfig n8/n8config.go 101
0.0% NewConfigFromNesRom n8/n8config.go 113
100.0% Parse n8/n8config.go 143
0.0% Serialize n8/n8config.go 157
0.0% PrintFull n8/n8config.go 174
0.0% Print n8/n8config.go 218
0.0% boolToYesNo n8/n8config.go 227
0.0% getMask n8/n8config.go 234
0.0% GetFileInfo n8/n8files.go 43
0.0% SetFileInfo n8/n8files.go 79
0.0% DirRead n8/n8files.go 90
0.0% GetDirRecords n8/n8files.go 127
0.0% FileCrc n8/n8files.go 176
90.0% OpenFile n8/n8files.go 208
60.0% CloseFile n8/n8files.go 228
0.0% FileSetPointer n8/n8files.go 249
0.0% DirOpen n8/n8files.go 274
0.0% DirLoad n8/n8files.go 299
0.0% GetDirSize n8/n8files.go 329
0.0% ReadFile n8/n8files.go 345
0.0% ReadFileFromMemory n8/n8files.go 389
68.8% FileWrite n8/n8files.go 436
0.0% FileWriteFromMemory n8/n8files.go 465
0.0% mkdir n8/n8files.go 509
0.0% DeleteRecord n8/n8files.go 538
0.0% DiskInit n8/n8files.go 569
0.0% DiskRead n8/n8files.go 591
0.0% changeExtension n8/n8files.go 633
100.0% NewVdc n8/n8hardware.go 28
100.0% GetVals n8/n8hardware.go 61
0.0% Print n8/n8hardware.go 70
100.0% NewRtcTime n8/n8hardware.go 77
100.0% NewRtcTimeFromSerial n8/n8hardware.go 89
100.0% decToHex n8/n8hardware.go 110
100.0% Read n8/n8serial.go 91
100.0% Write n8/n8serial.go 94
100.0% Close n8/n8serial.go 97
100.0% CloseSerial n8/n8serial.go 105
71.4% InitSerial n8/n8serial.go 115
100.0% TxData n8/n8serial.go 142
100.0% Tx8 n8/n8serial.go 158
100.0% Tx16 n8/n8serial.go 166
100.0% Tx32 n8/n8serial.go 174
100.0% TxCmd n8/n8serial.go 184
100.0% TxCmdExec n8/n8serial.go 205
100.0% TxString n8/n8serial.go 213
100.0% TxStringFifo n8/n8serial.go 230
100.0% TxDataAck n8/n8serial.go 247
100.0% RxData n8/n8serial.go 282
100.0% Rx8 n8/n8serial.go 310
100.0% Rx16 n8/n8serial.go 321
100.0% Rx32 n8/n8serial.go 332
100.0% RxString n8/n8serial.go 346
100.0% RxFileInfo n8/n8serial.go 368
100.0% GetStatus n8/n8serial.go 402
83.3% IsStatusOkay n8/n8serial.go 424

Total Coverage: 28.1%

| Coverage | Function | File | Line | | --- | --- | --- | --- | | 100.0% | SendString | n8/n8command.go | 31 | | 100.0% | GetConfig | n8/n8command.go | 52 | | 64.7% | CopyFolder | n8/n8command.go | 66 | | 87.5% | getFiles | n8/n8command.go | 97 | | 75.0% | getDirectories | n8/n8command.go | 114 | | 48.8% | CopyFile | n8/n8command.go | 134 | | 100.0% | SetConfig | n8/n8command.go | 208 | | 0.0% | Command | n8/n8command.go | 217 | | 0.0% | SelectGame | n8/n8command.go | 228 | | 0.0% | getTestMapper | n8/n8command.go | 248 | | 0.0% | MakeDir | n8/n8command.go | 274 | | 0.0% | Halt | n8/n8command.go | 291 | | 0.0% | HaltExit | n8/n8command.go | 310 | | 0.0% | MapLoadSDC | n8/n8command.go | 323 | | 0.0% | Reboot | n8/n8command.go | 363 | | 0.0% | LoadOS | n8/n8command.go | 383 | | 0.0% | LoadGame | n8/n8command.go | 442 | | 0.0% | GetVdc | n8/n8command.go | 514 | | 0.0% | GetRtc | n8/n8command.go | 530 | | 0.0% | SetRtc | n8/n8command.go | 546 | | 0.0% | EnterServiceMode | n8/n8command.go | 566 | | 0.0% | ExitServiceMode | n8/n8command.go | 604 | | 0.0% | isServiceMode | n8/n8command.go | 636 | | 0.0% | Recovery | n8/n8command.go | 651 | | 0.0% | bootWait | n8/n8command.go | 717 | | 100.0% | FifoWr | n8/n8command.go | 750 | | 0.0% | MemoryCrc | n8/n8command.go | 758 | | 0.0% | MemorySet | n8/n8command.go | 787 | | 0.0% | MemoryTest | n8/n8command.go | 824 | | 0.0% | ReadFlash | n8/n8command.go | 854 | | 82.1% | ReadMemory | n8/n8command.go | 874 | | 0.0% | WriteFlash | n8/n8command.go | 927 | | 77.8% | WriteMemory | n8/n8command.go | 960 | | 0.0% | fpgaPostInit | n8/n8command.go | 994 | | 0.0% | FpgaInit | n8/n8command.go | 1016 | | 0.0% | FpgaInitFromFlash | n8/n8command.go | 1037 | | 0.0% | FpgaInitFromSD | n8/n8command.go | 1058 | | 66.7% | GetSerialConfig | n8/n8config.go | 46 | | 100.0% | GetMapIndex | n8/n8config.go | 53 | | 0.0% | GetSubmap | n8/n8config.go | 56 | | 100.0% | GetPrgSize | n8/n8config.go | 59 | | 100.0% | GetChrSize | n8/n8config.go | 62 | | 100.0% | GetSrmSize | n8/n8config.go | 65 | | 100.0% | GetMasterVol | n8/n8config.go | 68 | | 100.0% | GetSSKeyMenu | n8/n8config.go | 71 | | 100.0% | GetSSKeySave | n8/n8config.go | 74 | | 100.0% | GetSSKeyLoad | n8/n8config.go | 77 | | 100.0% | GetMapCfg | n8/n8config.go | 80 | | 100.0% | GetCtrl | n8/n8config.go | 83 | | 100.0% | NewMapConfigFromBinary | n8/n8config.go | 88 | | 100.0% | NewMapConfig | n8/n8config.go | 101 | | 0.0% | NewConfigFromNesRom | n8/n8config.go | 113 | | 100.0% | Parse | n8/n8config.go | 143 | | 0.0% | Serialize | n8/n8config.go | 157 | | 0.0% | PrintFull | n8/n8config.go | 174 | | 0.0% | Print | n8/n8config.go | 218 | | 0.0% | boolToYesNo | n8/n8config.go | 227 | | 0.0% | getMask | n8/n8config.go | 234 | | 0.0% | GetFileInfo | n8/n8files.go | 43 | | 0.0% | SetFileInfo | n8/n8files.go | 79 | | 0.0% | DirRead | n8/n8files.go | 90 | | 0.0% | GetDirRecords | n8/n8files.go | 127 | | 0.0% | FileCrc | n8/n8files.go | 176 | | 90.0% | OpenFile | n8/n8files.go | 208 | | 60.0% | CloseFile | n8/n8files.go | 228 | | 0.0% | FileSetPointer | n8/n8files.go | 249 | | 0.0% | DirOpen | n8/n8files.go | 274 | | 0.0% | DirLoad | n8/n8files.go | 299 | | 0.0% | GetDirSize | n8/n8files.go | 329 | | 0.0% | ReadFile | n8/n8files.go | 345 | | 0.0% | ReadFileFromMemory | n8/n8files.go | 389 | | 68.8% | FileWrite | n8/n8files.go | 436 | | 0.0% | FileWriteFromMemory | n8/n8files.go | 465 | | 0.0% | mkdir | n8/n8files.go | 509 | | 0.0% | DeleteRecord | n8/n8files.go | 538 | | 0.0% | DiskInit | n8/n8files.go | 569 | | 0.0% | DiskRead | n8/n8files.go | 591 | | 0.0% | changeExtension | n8/n8files.go | 633 | | 100.0% | NewVdc | n8/n8hardware.go | 28 | | 100.0% | GetVals | n8/n8hardware.go | 61 | | 0.0% | Print | n8/n8hardware.go | 70 | | 100.0% | NewRtcTime | n8/n8hardware.go | 77 | | 100.0% | NewRtcTimeFromSerial | n8/n8hardware.go | 89 | | 100.0% | decToHex | n8/n8hardware.go | 110 | | 100.0% | Read | n8/n8serial.go | 91 | | 100.0% | Write | n8/n8serial.go | 94 | | 100.0% | Close | n8/n8serial.go | 97 | | 100.0% | CloseSerial | n8/n8serial.go | 105 | | 71.4% | InitSerial | n8/n8serial.go | 115 | | 100.0% | TxData | n8/n8serial.go | 142 | | 100.0% | Tx8 | n8/n8serial.go | 158 | | 100.0% | Tx16 | n8/n8serial.go | 166 | | 100.0% | Tx32 | n8/n8serial.go | 174 | | 100.0% | TxCmd | n8/n8serial.go | 184 | | 100.0% | TxCmdExec | n8/n8serial.go | 205 | | 100.0% | TxString | n8/n8serial.go | 213 | | 100.0% | TxStringFifo | n8/n8serial.go | 230 | | 100.0% | TxDataAck | n8/n8serial.go | 247 | | 100.0% | RxData | n8/n8serial.go | 282 | | 100.0% | Rx8 | n8/n8serial.go | 310 | | 100.0% | Rx16 | n8/n8serial.go | 321 | | 100.0% | Rx32 | n8/n8serial.go | 332 | | 100.0% | RxString | n8/n8serial.go | 346 | | 100.0% | RxFileInfo | n8/n8serial.go | 368 | | 100.0% | GetStatus | n8/n8serial.go | 402 | | 83.3% | IsStatusOkay | n8/n8serial.go | 424 | ## Total Coverage: 28.1%
All checks were successful
Test / test (pull_request) Successful in 2m15s
Required
Details
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin tests:tests
git switch tests
Sign in to join this conversation.
No reviewers
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jeff/goedlink#14
No description provided.