Description
Tests are not generated if there are import aliases.
To Reproduce
Steps to reproduce the behavior:
- Write the following function:
import c "math/cmplx"
func Abs(n complex128) float64 {
return c.Abs(n)
}
- Use plugin to generate tests
Expected behavior
Similar to this file should be generated.
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestAbsByUtGoFuzzer(t *testing.T) {
actualVal := Abs(complex(1.0, 1.0))
assert.Equal(t, 1.4142135623730951, actualVal)
}
Actual behavior
Empty file is generated.
Visual proofs (screenshots, logs, images)
| UtBot - GoTestCasesGenerator | Fuzzing for function [Abs] - started
| UtBot - GoTestCasesGenerator | Error in flow: Timeout exceeded: Worker not connected. Process output: # simple [simple.test]
.\utbot_go_worker_samples_test.go:637:9: undefined: c
FAIL simple [build failed]
| UtBot - GoTestCasesGenerator | Fuzzing for function [Abs] - completed in 10014 ms. Generated 0 test cases
Environment
There is no specific environment.
Additional context
There is no specific environment.
Description
Tests are not generated if there are import aliases.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Similar to this file should be generated.
Actual behavior
Empty file is generated.
Visual proofs (screenshots, logs, images)
Environment
There is no specific environment.
Additional context
There is no specific environment.