title: How do I use a module from multiple unit test modules?
body: <p>I have two modules with unit tests and I want to access constants/variables with expected test results from both of those modules.</p>
  <p>File: <code>src/lib.rs</code></p>
  <pre class="lang-rust prettyprint-override"><code>mod other;
  
  #[cfg( test )]
  mod tests {
      mod expected;
      use crate::tests::expected::FOUR;
  
      #[test]
      fn it_works() {
          let result = 2 + 2;
          assert_eq!( result, FOUR );
      }
  }
  </code></pre>
  <p>File: <code>src/other.rs</code></p>
  <pre class="lang-rust prettyprint-override"><code>#[cfg( test )]
  mod tests {
      use crate::tests::expected::EIGHT;
      #[test]
      fn it_works() {
          let result = 4 + 4;
          assert_eq!( result, EIGHT );
      }
  }
  </code></pre>
  <p>File <code>src/tests/expected.rs</code></p>
  <pre class="lang-rust prettyprint-override"><code>pub const FOUR: i32 = 4;
  pub const EIGHT: i32 = 8;
  </code></pre>
  <p>From <code>src/lib.rs</code> I can access the constants within <code>expected.rs</code>. But this is not true from <code>src/other.rs</code>. I get the follwing error:</p>
  <pre><code>error[E0603]: module `expected` is private
   --&gt; src/other.rs:3:20
    |
  3 |     use crate::tests::expected::EIGHT;
    |                       ^^^^^^^^ private module
    |
  note: the module `expected` is defined here
   --&gt; src/lib.rs:5:2
    |
  5 |     mod expected;
    |     ^^^^^^^^^^^^^
  </code></pre>
  <p>I have no idea how to make <code>expected</code> public. Where would I place <code>expected.rs</code> or how would I make it accessible from the test code of other modules of the library?</p>