Skip to content

Commit

Permalink
Add unit test cases for rti_common.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
chanijjani committed Feb 17, 2024
1 parent caae7c9 commit a19b766
Show file tree
Hide file tree
Showing 3 changed files with 499 additions and 10 deletions.
16 changes: 8 additions & 8 deletions rust/rti/src/net_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ use std::io::{Read, Write};
use std::mem;
use std::net::TcpStream;

use socket_server_mocker::server_mocker::ServerMocker;
use socket_server_mocker::server_mocker_instruction::{
ServerMockerInstruction, ServerMockerInstructionsList,
};
use socket_server_mocker::tcp_server_mocker::TcpServerMocker;

use rand::{rngs::StdRng, Rng, RngCore, SeedableRng};

use crate::tag::Tag;

pub struct NetUtil {}
Expand Down Expand Up @@ -173,6 +165,14 @@ impl NetUtil {
mod tests {
use super::*;

use socket_server_mocker::server_mocker::ServerMocker;
use socket_server_mocker::server_mocker_instruction::{
ServerMockerInstruction, ServerMockerInstructionsList,
};
use socket_server_mocker::tcp_server_mocker::TcpServerMocker;

use rand::{rngs::StdRng, Rng, RngCore, SeedableRng};

const MAX_BUFFER_SIZE: usize = 30000;
const ERR_MESSAGE: &str = "test message";
const I64_SIZE: usize = mem::size_of::<i64>();
Expand Down
Loading

0 comments on commit a19b766

Please sign in to comment.