Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncomment RSN4 test that now works. #151

Merged
merged 1 commit into from
Jan 22, 2016
Merged

Uncomment RSN4 test that now works. #151

merged 1 commit into from
Jan 22, 2016

Conversation

tcard
Copy link
Contributor

@tcard tcard commented Jan 20, 2016

No description provided.

@mattheworiordan
Copy link
Member

👍

@ricardopereira
Copy link
Contributor

The test is marked has pending: pending("releaseChannel"). I will change that.

@mattheworiordan
Copy link
Member

Ok, didn't see that in the commit as it was off the page, thanks

@ricardopereira
Copy link
Contributor

The test is failing.

I made a test:

class Item {
    var name: String = ""
    init(name: String) {
        self.name = name
    }
}

class Collection {
    var dictionary = NSMutableDictionary()
    func add(name: String) -> Item {
        dictionary[name] = Item(name: name)
        return dictionary[name] as! Item
    }
    func release(item: Item) {
        dictionary.removeObjectForKey(item.name)
    }
}

let items = Collection()
weak var item1: Item! = items.add("asjflkajsdf")

print(item1.name)
items.release(item1)
print(item1.name) //<-- EXC_BAD_INSTRUCTION 💥

And item1 == nil is true.

The ARTChannelCollection also uses removeObjectForKey, so it is something retaining the channel.

@mattheworiordan
Copy link
Member

Ok, leave for now and we'll fix later. Let's see how the write tests approach works over the next few days

@ricardopereira
Copy link
Contributor

Ok 👍

@tcard
Copy link
Contributor Author

tcard commented Jan 21, 2016

Oh, come on... Maybe we can just write this test in Obj-C for now. Anyway, if it's pending it shouldn't be also commented, don't you think?

@ricardopereira
Copy link
Contributor

Yes. First I commented it and then I found out about pending because it isn't referenced on the API docs.

@tcard
Copy link
Contributor Author

tcard commented Jan 21, 2016

So should I merge this anyway?

tcard added a commit that referenced this pull request Jan 22, 2016
Uncomment RSN4 test that now works.
@tcard tcard merged commit 282cd06 into master Jan 22, 2016
@ricardopereira ricardopereira deleted the uncomment-rsn4 branch January 27, 2016 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants