go-cursor-help/pkg/idgen/generator_test.go
dacrab 99e31a7bba chore: Refactor build and installation scripts; update configuration and release process
- 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.
2024-12-27 02:05:35 +02:00

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")
}