Can't find my crate from tests directory?

I'm trying to create some unit tests for our own crate. It's a new version of this crate updated to use the newest version of Rust and new libraries:

I added a 'tests' directory to our project, and now am trying to use it.

use fractal_api as API;

fn test_login() {

    //assert_eq!(4, adder::add_two(2));

If I try to import as 'fractal-api' or 'fractal-api-server', I get this error:

expected one of `::`, `;`, or `as`, found `-`

Otherwise, cargo can't seem to find it. So, where can I find the name of the crate that I can use to upload? Do I need to specify it somewhere from the crate itself?


Blog Post: Why Cryptocurrencies Need Rust

- is not a valid character for Rust identifiers. When your crate is named that way in Cargo.toml, all dashes are translated to underscores in Rust -- fractal_api, fractal_api_server, etc.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.