issue when test hascal
mmdbalkhi opened this issue · comments
komeil Parseh commented
when we do testing the hascal, tests always return 0 code and some tests failed.
Hascal version: main @ 24b4ab5
OS: Linux x86_64
tests command:
$ cd tests/
$ ../dist/hascal run run_tests.has
log:
cuse.has :
for_in.has :
func_overload.has :
nested_struct.has :
Error : File 'nested_struct.has' not found
test.has :
Traceback (most recent call last):
File "/home/mmdbalkhi/w/hascal/tests/../src/hascal.py", line 19, in <module>
main()
File "/home/mmdbalkhi/w/hascal/tests/../src/hascal.py", line 16, in main
HascalCompiler(sys.argv, BASE_DIR)
File "/home/mmdbalkhi/w/hascal/src/core/h_builder.py", line 160, in __init__
self.compile()
File "/home/mmdbalkhi/w/hascal/src/core/h_builder.py", line 238, in compile
output = generator.generate(tree)
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler.py", line 127, in generate
_expr = self.walk(tree)
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler.py", line 231, in walk
result.append(self.walk(statement))
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler.py", line 929, in walk
"%s %s %s(int argc,char** args) {\nstd::vector<std::string> %s;for(int i=0;i<argc;i++){%s.push_back(args[i]);}\n%s\n}\n" if self.use_gc else \
AttributeError: 'Generator' object has no attribute 'use_gc'
format.has :
get.has :
Error : Unknown error in compile file
hello.has :
read_from_stdin.has :
regex.has :
linear_regression.has :
Error : Unknown error in compile file
cinclude.has :
ptr.has :
compatible_type.has :
scope.has:
mem.has:
Error : Cannot delete a pointer that not allocated with `new` keyword:16
path.has:
multiline.has:
func.has:
fibonacci.has:
enum.has:
dec.has:
colorized_term.has:
null_in_arth.has:
null_in_arth.has::
Warning : Assign 'NULL' to nullable variable 'x':3
Traceback (most recent call last):
File "/home/mmdbalkhi/w/hascal/tests/../src/hascal.py", line 19, in <module>
main()
File "/home/mmdbalkhi/w/hascal/tests/../src/hascal.py", line 16, in main
HascalCompiler(sys.argv, BASE_DIR)
File "/home/mmdbalkhi/w/hascal/src/core/h_builder.py", line 160, in __init__
self.compile()
File "/home/mmdbalkhi/w/hascal/src/core/h_builder.py", line 238, in compile
output = generator.generate(tree)
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler.py", line 127, in generate
_expr = self.walk(tree)
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler.py", line 231, in walk
result.append(self.walk(statement))
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler.py", line 888, in walk
_expr = self.walk(node[4])
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler.py", line 241, in walk
result.append(self.walk(statement))
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler.py", line 574, in walk
"expr": return_null_according_to_type(_name, _expr, _name["expr"], decl=False),
File "/home/mmdbalkhi/w/hascal/src/core/h_compiler_utils.py", line 190, in return_null_according_to_type
and (str(index["type"]) == "string" or isinstance(type_["type"],Array) or index["type"].is_ptr)
NameError: name 'index' is not defined
funcp.has:
static.has:
typeof.has:
komeil Parseh commented
@bistcuite I think this problem for now not solved,
like tests/mem.has:
$ ../dist/hascal mem.has
Error : Cannot delete a pointer that not allocated with `new` keyword:16
Hasan commented
@bistcuite I think this problem for now not solved,
like tests/mem.has:
$ ../dist/hascal mem.has Error : Cannot delete a pointer that not allocated with `new` keyword:16
This is a compiler bug, i will fix it.