Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Solution: Test Anagram

package main

import "testing"

func TestAnagram(t *testing.T) {
	res := is_anagram("abc", "abd")
	if res != false {
		t.Errorf("No anagram")
	}

	res = is_anagram("abc", "acb")
	if res != true {
		t.Errorf("Is anagram")
	}
}