Skip to content

Commit

Permalink
chore: Remove test_ from test names (#2024)
Browse files Browse the repository at this point in the history
To make @martinthomson happy :-)
  • Loading branch information
larseggert authored Jul 31, 2024
1 parent 4dc6ca4 commit b63e0ff
Show file tree
Hide file tree
Showing 17 changed files with 160 additions and 160 deletions.
110 changes: 55 additions & 55 deletions neqo-http3/src/connection_client.rs

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions neqo-http3/src/frames/tests/hframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ use crate::{
};

#[test]
fn test_data_frame() {
fn data_frame() {
let f = HFrame::Data { len: 3 };
enc_dec_hframe(&f, "0003010203", 3);
}

#[test]
fn test_headers_frame() {
fn headers_frame() {
let f = HFrame::Headers {
header_block: vec![0x01, 0x02, 0x03],
};
enc_dec_hframe(&f, "0103010203", 0);
}

#[test]
fn test_cancel_push_frame4() {
fn cancel_push_frame4() {
let f = HFrame::CancelPush { push_id: 5 };
enc_dec_hframe(&f, "030105", 0);
}

#[test]
fn test_settings_frame4() {
fn settings_frame4() {
let f = HFrame::Settings {
settings: HSettings::new(&[HSetting::new(HSettingType::MaxHeaderListSize, 4)]),
};
enc_dec_hframe(&f, "04020604", 0);
}

#[test]
fn test_push_promise_frame4() {
fn push_promise_frame4() {
let f = HFrame::PushPromise {
push_id: 4,
header_block: vec![0x61, 0x62, 0x63, 0x64],
Expand All @@ -53,7 +53,7 @@ fn test_push_promise_frame4() {
}

#[test]
fn test_goaway_frame4() {
fn goaway_frame4() {
let f = HFrame::Goaway {
stream_id: StreamId::new(5),
};
Expand All @@ -80,7 +80,7 @@ fn grease() {
}

#[test]
fn test_priority_update_request_default() {
fn priority_update_request_default() {
let f = HFrame::PriorityUpdateRequest {
element_id: 6,
priority: Priority::default(),
Expand All @@ -89,7 +89,7 @@ fn test_priority_update_request_default() {
}

#[test]
fn test_priority_update_request_incremental_default() {
fn priority_update_request_incremental_default() {
let f = HFrame::PriorityUpdateRequest {
element_id: 7,
priority: Priority::new(6, false),
Expand All @@ -98,7 +98,7 @@ fn test_priority_update_request_incremental_default() {
}

#[test]
fn test_priority_update_request_urgency_default() {
fn priority_update_request_urgency_default() {
let f = HFrame::PriorityUpdateRequest {
element_id: 8,
priority: Priority::new(3, true),
Expand All @@ -107,7 +107,7 @@ fn test_priority_update_request_urgency_default() {
}

#[test]
fn test_priority_update_push_default() {
fn priority_update_push_default() {
let f = HFrame::PriorityUpdatePush {
element_id: 10,
priority: Priority::default(),
Expand Down
24 changes: 12 additions & 12 deletions neqo-http3/src/frames/tests/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl FrameReaderTest {

// Test receiving byte by byte for a SETTINGS frame.
#[test]
fn test_frame_reading_with_stream_settings1() {
fn frame_reading_with_stream_settings1() {
let mut fr = FrameReaderTest::new();

// Send and read settings frame 040406040804
Expand All @@ -77,7 +77,7 @@ fn test_frame_reading_with_stream_settings1() {

// Test receiving byte by byte for a SETTINGS frame with larger varints
#[test]
fn test_frame_reading_with_stream_settings2() {
fn frame_reading_with_stream_settings2() {
let mut fr = FrameReaderTest::new();

// Read settings frame 400406064004084100
Expand All @@ -97,7 +97,7 @@ fn test_frame_reading_with_stream_settings2() {

// Test receiving byte by byte for a PUSH_PROMISE frame.
#[test]
fn test_frame_reading_with_stream_push_promise() {
fn frame_reading_with_stream_push_promise() {
let mut fr = FrameReaderTest::new();

// Read push-promise frame 05054101010203
Expand All @@ -121,7 +121,7 @@ fn test_frame_reading_with_stream_push_promise() {

// Test DATA
#[test]
fn test_frame_reading_with_stream_data() {
fn frame_reading_with_stream_data() {
let mut fr = FrameReaderTest::new();

// Read data frame 0003010203
Expand All @@ -137,7 +137,7 @@ fn test_frame_reading_with_stream_data() {

// Test an unknown frame
#[test]
fn test_unknown_frame() {
fn unknown_frame() {
// Construct an unknown frame.
const UNKNOWN_FRAME_LEN: usize = 832;

Expand All @@ -162,7 +162,7 @@ fn test_unknown_frame() {

// Test receiving byte by byte for a WT_FRAME_CLOSE_SESSION frame.
#[test]
fn test_frame_reading_with_stream_wt_close_session() {
fn frame_reading_with_stream_wt_close_session() {
let mut fr = FrameReaderTest::new();

// Read CloseSession frame 6843090000000548656c6c6f
Expand All @@ -181,7 +181,7 @@ fn test_frame_reading_with_stream_wt_close_session() {

// Test an unknown frame for WebTransportFrames.
#[test]
fn test_unknown_wt_frame() {
fn unknown_wt_frame() {
// Construct an unknown frame.
const UNKNOWN_FRAME_LEN: usize = 832;

Expand Down Expand Up @@ -268,7 +268,7 @@ fn test_reading_frame<T: FrameDecoder<T> + PartialEq + Debug>(
}

#[test]
fn test_complete_and_incomplete_unknown_frame() {
fn complete_and_incomplete_unknown_frame() {
// Construct an unknown frame.
const UNKNOWN_FRAME_LEN: usize = 832;
let mut enc = Encoder::with_capacity(UNKNOWN_FRAME_LEN + 4);
Expand Down Expand Up @@ -377,7 +377,7 @@ fn test_complete_and_incomplete_frame<T: FrameDecoder<T> + PartialEq + Debug>(
}

#[test]
fn test_complete_and_incomplete_frames() {
fn complete_and_incomplete_frames() {
const FRAME_LEN: usize = 10;
const HEADER_BLOCK: &[u8] = &[0x01, 0x02, 0x03, 0x04];

Expand Down Expand Up @@ -460,7 +460,7 @@ fn test_complete_and_incomplete_frames() {
}

#[test]
fn test_complete_and_incomplete_wt_frames() {
fn complete_and_incomplete_wt_frames() {
// H3_FRAME_TYPE_MAX_PUSH_ID
let f = WebTransportFrame::CloseSession {
error: 5,
Expand All @@ -474,7 +474,7 @@ fn test_complete_and_incomplete_wt_frames() {

// Test closing a stream before any frame is sent should not cause an error.
#[test]
fn test_frame_reading_when_stream_is_closed_before_sending_data() {
fn frame_reading_when_stream_is_closed_before_sending_data() {
let mut fr = FrameReaderTest::new();

fr.conn_s.stream_send(fr.stream_id, &[0x00]).unwrap();
Expand All @@ -497,7 +497,7 @@ fn test_frame_reading_when_stream_is_closed_before_sending_data() {
// Test closing a stream before any frame is sent should not cause an error.
// This is the same as the previous just for WebTransportFrame.
#[test]
fn test_wt_frame_reading_when_stream_is_closed_before_sending_data() {
fn wt_frame_reading_when_stream_is_closed_before_sending_data() {
let mut fr = FrameReaderTest::new();

fr.conn_s.stream_send(fr.stream_id, &[0x00]).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion neqo-http3/src/frames/tests/wtframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::enc_dec_wtframe;
use crate::frames::WebTransportFrame;

#[test]
fn test_wt_close_session() {
fn wt_close_session() {
let f = WebTransportFrame::CloseSession {
error: 5,
message: "Hello".to_string(),
Expand Down
Loading

0 comments on commit b63e0ff

Please sign in to comment.