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

Add NotifyAt #5

Merged
merged 1 commit into from
Dec 3, 2022
Merged

Add NotifyAt #5

merged 1 commit into from
Dec 3, 2022

Conversation

kelindar
Copy link
Owner

@kelindar kelindar commented Dec 3, 2022

func TestNotifyAt(t *testing.T) {
	m := mapFrom("300x300.png")

	// Create a new view
	c := counter(0)
	v := m.View(NewRect(0, 0, 99, 99), c.count)
	assert.NotNil(t, v)
	assert.Equal(t, 10000, int(c))

	m.NotifyAt(1, 1)
	update := <-v.Inbox
	assert.Equal(t, int16(1), update.X)
	assert.Equal(t, int16(1), update.Y)
}

@kelindar kelindar merged commit 545865a into master Dec 3, 2022
@kelindar kelindar deleted the notifyat branch December 3, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant