title: How to test equality of Swift enums with associated values
body: <p>I want to test the equality of two Swift enum values.  For example:</p>
  
  <pre><code>enum SimpleToken {
      case Name(String)
      case Number(Int)
  }
  let t1 = SimpleToken.Number(123)
  let t2 = SimpleToken.Number(123)
  XCTAssert(t1 == t2)
  </code></pre>
  
  <p>However, the compiler won't compile the equality expression:</p>
  
  <pre><code>error: could not find an overload for '==' that accepts the supplied arguments
      XCTAssert(t1 == t2)
      ^~~~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p>Do I have do define my own overload of the equality operator?  I was hoping the Swift compiler would handle it automatically, much like Scala and Ocaml do.</p>