Konstantin8105 / c4go

Transpiling C code to Go code
MIT License
363 stars 37 forks source link

string.memcmp #153

Closed Konstantin8105 closed 5 years ago

Konstantin8105 commented 5 years ago

Add test and implementation on Go for function string.h memcmp Description: https://en.cppreference.com/w/c/string/byte/memcmp File for test code add : c4go/tests/string.c

rjalfa commented 5 years ago

How to test only c4go/tests/string.c. Currently, it runs the whole bunch of tests.

Konstantin8105 commented 5 years ago

For example: go test -v -tags=integration -run=TestIntegrationScripts/tests/string.c

rjalfa commented 5 years ago

I have added #155 . I have added the Memcmp go code and the test. Do I need to do something else too? I am getting

build/tests/string/main_test.go:939: undefined: memcmp
build/tests/string/main_test.go:957: undefined: memcmp
build/tests/string/main_test.go:975: undefined: memcmp
Konstantin8105 commented 5 years ago

As I understood, also need registrate function here: https://github.com/Konstantin8105/c4go/blob/7b105cf3aa2065b7525d3ce2fd024100e7887bd0/program/function_definition.go#L207

Konstantin8105 commented 5 years ago

Thank you @rjalfa