Skip to content

Loading…

Winxed tests fail #8

Closed
leto opened this Issue · 6 comments

3 participants

@leto
Leto Labs LLC member
winxed t/winxed/001_load.t 
1..6
ok 1 - test_new_branch
ok 2 - test_new_repo
ok 3 - test_cstring
not ok 4 - open_repo
# too few positional arguments: 0 passed, 1 (or more) expected
# Called from 'get_sv' (src/Git2/Repository.winxed : 11)
# Called from 'Repository' (src/Git2/Repository.winxed : 50)
# Called from 'open_repo' (t/winxed/001_load.t : 43)
# Called from 'execute_test' (rosella/test.winxed : 833)
# Called from '__run_test' (rosella/test.winxed : 857)
# Called from 'run' (rosella/test.winxed : 808)
# Called from 'test' (rosella/test.winxed : 1123)
# Called from 'main' (t/winxed/001_load.t : 79)
# Called from 'main' (winxed_installed.winxed : 268)
# Called from '(entry)' ( : 0)
not ok 5 - repository_index
# Cannot resume dead coroutine.
# Called from 'Repository' (src/Git2/Repository.winxed : 50)
# Called from 'repository_index' (t/winxed/001_load.t : 57)
# Called from 'execute_test' (rosella/test.winxed : 833)
# Called from '__run_test' (rosella/test.winxed : 857)
# Called from 'run' (rosella/test.winxed : 808)
# Called from 'test' (rosella/test.winxed : 1123)
# Called from 'main' (t/winxed/001_load.t : 79)
# Called from 'main' (winxed_installed.winxed : 268)
# Called from '(entry)' ( : 0)
ok 6 - git_index
# Looks like you failed 2 of 6 tests
@plobsing

In winxed, all functions inside a class declaration are methods. Methods in parrot take a hidden argument (the invocant). Either use get_sv() as a method, or move the definition out of the class to where it will be interpretted to be a function (recommended).

@leto leto added a commit that referenced this issue
@leto leto Get closer to fixing #8 1dfe1d8
@leto
Leto Labs LLC member
$ winxed t/winxed/001_load.t 
1..6
ok 1 - test_new_branch
ok 2 - test_new_repo
ok 3 - test_cstring
ok 4 - open_repo
not ok 5 - repository_index
# No such attribute 'ptr'
# Called from 'repository_index' (t/winxed/001_load.t : 65)
# Called from 'execute_test' (rosella/test.winxed : 833)
# Called from '__run_test' (rosella/test.winxed : 857)
# Called from 'run' (rosella/test.winxed : 808)
# Called from 'test' (rosella/test.winxed : 1123)
# Called from 'main' (t/winxed/001_load.t : 79)
# Called from 'main' (winxed_installed.winxed : 268)
# Called from '(entry)' ( : 0)
ok 6 - git_index
# Looks like you failed 1 of 6 tests
@leto
Leto Labs LLC member

Maybe @NotFound can impart some of his massive wisdom to help solve this?

@Benabik

The line number is a little off, but the error is correct. It's caused by t/winxed/001_load.t:67, specifically git_index.ptr. Note that git_index is a Git2.Index, but there is no ptr attribute defined in Git2.Index (see src/Git2/Common.winxed:24-51).

@leto
Leto Labs LLC member

With my latest push to master (after creating and loading Git2.Index properly) gives this:

1..6
ok 1 - test_new_branch
ok 2 - test_new_repo
ok 3 - test_cstring
ok 4 - open_repo
not ok 5 - repository_index
# invoke() not implemented in class 'NameSpace'
# Called from 'get_sv' (./src/Git2/Index.winxed : 24)
# Called from 'Index' (./src/Git2/Index.winxed : 38)
# Called from 'repository_index' (t/winxed/001_load.t : 58)
# Called from 'execute_test' (rosella/test.winxed : 833)
# Called from '__run_test' (rosella/test.winxed : 857)
# Called from 'run' (rosella/test.winxed : 808)
# Called from 'test' (rosella/test.winxed : 1123)
# Called from 'main' (t/winxed/001_load.t : 79)
# Called from 'main' (winxed_installed.winxed : 268)
# Called from '(entry)' ( : 0)
ok 6 - git_index
# Looks like you failed 1 of 6 tests
@leto
Leto Labs LLC member

Somehow I am getting a namespace object instead of an instance of StructView

@leto leto closed this in b918081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.