title: Unit test for function in different directory is giving error
body: <p>I'm trying to write a unit test for the GCD code written <a href="https://github.com/rajcspsg/ProgrammingRust/blob/master/src/chapter1/gcd.rs" rel="nofollow noreferrer">here</a>. I'm also trying to write unit tests for this function. The test is <a href="https://github.com/rajcspsg/ProgrammingRust/blob/master/tests/gcd.rs" rel="nofollow noreferrer">here</a> </p>
  
  <p>This is the directory structure of the project:</p>
  
  <pre class="lang-none prettyprint-override"><code>ProgrammingRust $ tree
  .
  ├── Cargo.lock
  ├── Cargo.toml
  ├── README.md
  ├── src
  │   ├── chapter1
  │   │   ├── cmd_line_args.rs
  │   │   └── gcd.rs
  │   └── main.rs
  ├── target
  │   ├── debug
  │   │   ├── 
  └── tests
      ├── chapter1
      └── gcd.rs
  
  48 directories, 108 files
  </code></pre>
  
  <p>When I try to run the tests, I get this error: </p>
  
  <pre class="lang-none prettyprint-override"><code>error[E0432]: unresolved import `chapter1`
  --&gt; tests/gcd.rs:1:7
  1 |   use chapter1;
    |       ^^^^^^^^ no `chapter1` in the root
  
  error[E0425]: cannot find function `gcd` in this scope
  --&gt; tests/gcd.rs:10:20
     |
  10 |         assert_eq!(gcd(15, 14), 1);
     |                    ^^^ not found in this scope
  </code></pre>
  
  <p>I want to access the function in <code>src/chapter1/gcd.rs</code> at <code>tests/gcd.rs</code>, but I don't know how to link the function <code>gcd.rs</code> to a test in the <code>tests</code> folder.</p>