mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 04:22:06 +08:00

- Enhanced build scripts for improved parallel execution and optimization flags. - Updated installation scripts for better user experience and error handling. - Modified .gitignore to include new build artifacts and IDE configurations. - Updated .goreleaser.yml for better release management and platform support. - Removed deprecated main.go file and adjusted README for clarity on installation and usage. - Added support for multiple architectures in build process, including 32-bit and 64-bit for Windows, macOS, and Linux. These changes streamline the development workflow and enhance the overall usability of the Cursor ID Modifier tool.
27 lines
645 B
Go
27 lines
645 B
Go
package idgen
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNewGenerator(t *testing.T) {
|
|
gen := NewGenerator()
|
|
assert.NotNil(t, gen, "Generator should not be nil")
|
|
}
|
|
|
|
func TestGenerateMachineID(t *testing.T) {
|
|
gen := NewGenerator()
|
|
id, err := gen.GenerateMachineID()
|
|
assert.NoError(t, err, "Should not return an error")
|
|
assert.NotEmpty(t, id, "Generated machine ID should not be empty")
|
|
}
|
|
|
|
func TestGenerateDeviceID(t *testing.T) {
|
|
gen := NewGenerator()
|
|
id, err := gen.GenerateDeviceID()
|
|
assert.NoError(t, err, "Should not return an error")
|
|
assert.NotEmpty(t, id, "Generated device ID should not be empty")
|
|
}
|