Open
Description
Description
Test generation for JavaScript Recursion Fibonacci - produces Warning and TypeErrors
To Reproduce
- Open https://www.utbot.org/utbot page
- Press Try it online button
- Select JavaScript
- Select Recursion Fibonacci
- Press Generate and Run Tests
Expected behavior
Tests are supposed to be generated successfully.
Actual behavior
There are warning and TypeError: not a function in the Test generation result bottom section.
Visual proofs (screenshots, logs, images)
TEST GENERATION: SUCCEEDED
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
/var/utbot/processing/utbot-javascript-274571/source.js:2
cov_12rrevarow=function(){return actualCoverage;};}return actualCoverage;}cov_12rrevarow();function fibonacci(n){cov_12rrevarow().f[0]++;cov_12rrevarow().s[0]++;if((cov_12rrevarow().b[1][0]++,n<0)||(cov_12rrevarow().b[1][1]++,n>25)){cov_12rrevarow().b[0][0]++;cov_12rrevarow().s[1]++;return-1;}else{cov_12rrevarow().b[0][1]++;}cov_12rrevarow().s[2]++;if(n===0){cov_12rrevarow().b[2][0]++;cov_12rrevarow().s[3]++;return 0;}else{cov_12rrevarow().b[2][1]++;}cov_12rrevarow().s[4]++;if(n===1){cov_12rrevarow().b[3][0]++;cov_12rrevarow().s[5]++;return 1;}else{cov_12rrevarow().b[3][1]++;}cov_12rrevarow().s[6]++;return this.fib(n-1)+this.fib(n-2);}// Start of exports generated by UTBot
^
TypeError: this.fib is not a function
at Object.fibonacci (/var/utbot/processing/utbot-javascript-274571/source.js:2:620)
at Object.<anonymous> (/var/utbot/processing/utbot-javascript-274571/utbotJs/temp17.js:2:264)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module.replacementCompile (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:18:47
Node.js v18.9.0
/var/utbot/processing/utbot-javascript-274571/source.js:2
cov_12rrevarow=function(){return actualCoverage;};}return actualCoverage;}cov_12rrevarow();function fibonacci(n){cov_12rrevarow().f[0]++;cov_12rrevarow().s[0]++;if((cov_12rrevarow().b[1][0]++,n<0)||(cov_12rrevarow().b[1][1]++,n>25)){cov_12rrevarow().b[0][0]++;cov_12rrevarow().s[1]++;return-1;}else{cov_12rrevarow().b[0][1]++;}cov_12rrevarow().s[2]++;if(n===0){cov_12rrevarow().b[2][0]++;cov_12rrevarow().s[3]++;return 0;}else{cov_12rrevarow().b[2][1]++;}cov_12rrevarow().s[4]++;if(n===1){cov_12rrevarow().b[3][0]++;cov_12rrevarow().s[5]++;return 1;}else{cov_12rrevarow().b[3][1]++;}cov_12rrevarow().s[6]++;return this.fib(n-1)+this.fib(n-2);}// Start of exports generated by UTBot
^
TypeError: this.fib is not a function
at Object.fibonacci (/var/utbot/processing/utbot-javascript-274571/source.js:2:620)
at Object.<anonymous> (/var/utbot/processing/utbot-javascript-274571/utbotJs/temp19.js:2:259)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module.replacementCompile (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:18:47
Node.js v18.9.0
/var/utbot/processing/utbot-javascript-274571/source.js:2
cov_12rrevarow=function(){return actualCoverage;};}return actualCoverage;}cov_12rrevarow();function fibonacci(n){cov_12rrevarow().f[0]++;cov_12rrevarow().s[0]++;if((cov_12rrevarow().b[1][0]++,n<0)||(cov_12rrevarow().b[1][1]++,n>25)){cov_12rrevarow().b[0][0]++;cov_12rrevarow().s[1]++;return-1;}else{cov_12rrevarow().b[0][1]++;}cov_12rrevarow().s[2]++;if(n===0){cov_12rrevarow().b[2][0]++;cov_12rrevarow().s[3]++;return 0;}else{cov_12rrevarow().b[2][1]++;}cov_12rrevarow().s[4]++;if(n===1){cov_12rrevarow().b[3][0]++;cov_12rrevarow().s[5]++;return 1;}else{cov_12rrevarow().b[3][1]++;}cov_12rrevarow().s[6]++;return this.fib(n-1)+this.fib(n-2);}// Start of exports generated by UTBot
^
TypeError: this.fib is not a function
at Object.fibonacci (/var/utbot/processing/utbot-javascript-274571/source.js:2:620)
at Object.<anonymous> (/var/utbot/processing/utbot-javascript-274571/utbotJs/temp18.js:2:264)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module.replacementCompile (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:18:47
Node.js v18.9.0
/var/utbot/processing/utbot-javascript-274571/source.js:2
cov_12rrevarow=function(){return actualCoverage;};}return actualCoverage;}cov_12rrevarow();function fibonacci(n){cov_12rrevarow().f[0]++;cov_12rrevarow().s[0]++;if((cov_12rrevarow().b[1][0]++,n<0)||(cov_12rrevarow().b[1][1]++,n>25)){cov_12rrevarow().b[0][0]++;cov_12rrevarow().s[1]++;return-1;}else{cov_12rrevarow().b[0][1]++;}cov_12rrevarow().s[2]++;if(n===0){cov_12rrevarow().b[2][0]++;cov_12rrevarow().s[3]++;return 0;}else{cov_12rrevarow().b[2][1]++;}cov_12rrevarow().s[4]++;if(n===1){cov_12rrevarow().b[3][0]++;cov_12rrevarow().s[5]++;return 1;}else{cov_12rrevarow().b[3][1]++;}cov_12rrevarow().s[6]++;return this.fib(n-1)+this.fib(n-2);}// Start of exports generated by UTBot
^
TypeError: this.fib is not a function
at Object.fibonacci (/var/utbot/processing/utbot-javascript-274571/source.js:2:620)
at Object.<anonymous> (/var/utbot/processing/utbot-javascript-274571/utbotJs/temp3.js:2:264)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module.replacementCompile (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:18:47
Node.js v18.9.0
/var/utbot/processing/utbot-javascript-274571/source.js:2
cov_12rrevarow=function(){return actualCoverage;};}return actualCoverage;}cov_12rrevarow();function fibonacci(n){cov_12rrevarow().f[0]++;cov_12rrevarow().s[0]++;if((cov_12rrevarow().b[1][0]++,n<0)||(cov_12rrevarow().b[1][1]++,n>25)){cov_12rrevarow().b[0][0]++;cov_12rrevarow().s[1]++;return-1;}else{cov_12rrevarow().b[0][1]++;}cov_12rrevarow().s[2]++;if(n===0){cov_12rrevarow().b[2][0]++;cov_12rrevarow().s[3]++;return 0;}else{cov_12rrevarow().b[2][1]++;}cov_12rrevarow().s[4]++;if(n===1){cov_12rrevarow().b[3][0]++;cov_12rrevarow().s[5]++;return 1;}else{cov_12rrevarow().b[3][1]++;}cov_12rrevarow().s[6]++;return this.fib(n-1)+this.fib(n-2);}// Start of exports generated by UTBot
^
TypeError: this.fib is not a function
at Object.fibonacci (/var/utbot/processing/utbot-javascript-274571/source.js:2:620)
at Object.<anonymous> (/var/utbot/processing/utbot-javascript-274571/utbotJs/temp15.js:2:264)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module.replacementCompile (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:60:13)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Object.<anonymous> (/usr/lib/node_modules/nyc/node_modules/append-transform/index.js:64:4)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:18:47
Node.js v18.9.0
TEST RUN: SUCCEEDED
✔ testFibonacci1
✔ testFibonacci2
✔ testFibonacci3
✔ testFibonacci4
4 passing (4ms)