title: Swift test give error "Undefined symbols for architecture x86_64"
body: <p>I'm running <code>swift test</code> from the command line to run the test cases. This is the test case:</p>
  
  <pre><code>import XCTest
  @testable import vnk_swift
  
  class KeyMappingTests: XCTestCase {
      static var allTests : [(String, (KeyMappingTests) -&gt; () throws -&gt; Void)] {
          return [
              // ("testExample", testExample),
          ]
      }
  
      func testExample() {
          let keyMapping = KeyMapping()
          XCTAssertNotNil(keyMapping , "PASS")
      }
  }
  </code></pre>
  
  <p>And here is the output message.</p>
  
  <p><img src="https://cloud.githubusercontent.com/assets/4214509/21471516/3ff0e1c0-cae8-11e6-9855-7ff1937a69b6.png" alt="image"></p>
  
  <p>If I remove the usage of <code>KeyMapping</code>, everything works fine:</p>
  
  <pre><code>    func testExample() {
          // let keyMapping = KeyMapping()
          XCTAssertNotNil(true , "PASS")
      }
  </code></pre>
  
  <p><img src="https://cloud.githubusercontent.com/assets/4214509/21471625/7e85cc78-caea-11e6-80f9-6fcbe78fd2df.png" alt="image"></p>
  
  <p>Looks like there is a problem when I'm trying to use a class. <strong>How do I fix this?</strong></p>
  
  <p><em>(I did not use Xcode for this project as I started with <code>swift package init</code>, the source code for this project is here: <a href="https://github.com/trungdq88/vnk-swift" rel="noreferrer">https://github.com/trungdq88/vnk-swift</a>)</em></p>