mirror of
https://github.com/yv1ing/ShotRDP.git
synced 2025-09-16 15:10:57 +08:00
整理代码
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/hex"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestWriteUInt16LE(t *testing.T) {
|
||||
buff := &bytes.Buffer{}
|
||||
WriteUInt32LE(66538, buff)
|
||||
result := hex.EncodeToString(buff.Bytes())
|
||||
expected := "ea030100"
|
||||
if result != expected {
|
||||
t.Error(result, "not equals to", expected)
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
// rle_test.go
|
||||
package core
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestSum(t *testing.T) {
|
||||
input := []byte{
|
||||
192, 44, 200, 8, 132, 200, 8, 200, 8, 200, 8, 200, 8, 0, 19, 132, 232, 8, 12, 50, 142, 66, 77, 58, 208, 59, 225, 25, 1, 0, 0, 0, 0, 0, 0, 0, 132, 139, 33, 142, 66, 142, 66, 142, 66, 208, 59, 4, 43, 1, 0, 0, 0, 0, 0, 0, 0, 132, 203, 41, 142, 66, 142, 66, 142, 66, 208, 59, 96, 0, 1, 0, 0, 0, 0, 0, 0, 0, 132, 9, 17, 142, 66, 142, 66, 142, 66, 208, 59, 230, 27, 1, 0, 0, 0, 0, 0, 0, 0, 132, 200, 8, 9, 17, 139, 33, 74, 25, 243, 133, 14, 200, 8, 132, 200, 8, 200, 8, 200, 8, 200, 8,
|
||||
}
|
||||
out := Decompress(input, 64, 64, 3)
|
||||
fmt.Println(out)
|
||||
}
|
||||
Reference in New Issue
Block a user