terryyin / lizard

A simple code complexity analyser without caring about the C/C++ header files or Java imports, supports most of the popular languages.
Other
1.85k stars 250 forks source link

The ObjC unittest failes #136

Open serjant opened 8 years ago

serjant commented 8 years ago

So actually it adds addition parameter pointer to the long_name result, here is the output:

`FAIL: test_one_objc_functio_nwith_two_param (test.test_languages.testObjC.Test_objc_lizard)

Traceback (most recent call last): File "test/test_languages/testObjC.py", line 34, in test_one_objc_functio_nwith_two_param self.assertEqual("scanJSONObject:( id * ) error:( NSError * )", result[0].long_name) AssertionError: 'scanJSONObject:( id * ) error:( NSError * )' != 'scanJSONObject:( id * ) id error error:( NSError * )'

FAIL: test_one_objc_function_with_three_param (test.test_languages.testObjC.Test_objc_lizard)

Traceback (most recent call last): File "test/test_languages/testObjC.py", line 39, in test_one_objc_function_with_three_param self.assertEqual("initWithRequest:( NSURLRequest * ) delegate:( id < NSURLConnectionDelegate > ) startImmediately:( BOOL )", result[0].long_name) AssertionError: 'initWithRequest:( NSURLRequest * ) delegate:( id < NSURLConnectionDelegate > ) startImmediately:( BOOL )' != 'initWithRequest:( NSURLRequest * ) NSURLRequest *delegate delegate:( id < NSURLConnectionDelegate > ) id < NSURLConnectionDelegate >startImmediately startImmediately:( BOOL )'


Ran 8 tests in 0.004s

FAILED (failures=2)`

terryyin commented 8 years ago

@serjant what just have happened here?

serjant commented 8 years ago

I thought that the problem was in my fork, thus i closed the bug, but It turns out that that the long_name gets the wrong value in your fork too, i added unittest method which does not pass at all - wrong long_name value and wrong parameters extraction

serjant commented 8 years ago

I will commit soon to my fork - you will see