add more unit tests
This commit is contained in:
parent
8426698b9f
commit
c61c267b02
8 changed files with 167 additions and 27 deletions
|
@ -1,4 +1,5 @@
|
|||
use clap::Parser;
|
||||
|
||||
use servicepoint2::{ByteGrid, Command, Connection, Origin};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
|
@ -43,6 +44,6 @@ fn main() {
|
|||
}
|
||||
|
||||
connection
|
||||
.send(Command::Cp437Data(Origin::top_left(), chars).into())
|
||||
.send(Command::Cp437Data(Origin(0, 0), chars).into())
|
||||
.unwrap();
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ fn main() {
|
|||
connection
|
||||
.send(
|
||||
Command::BitmapLinearWin(
|
||||
Origin::top_left(),
|
||||
Origin(0, 0),
|
||||
field.clone(),
|
||||
CompressionCode::Bzip2,
|
||||
)
|
||||
|
|
|
@ -4,8 +4,8 @@ use std::time::Duration;
|
|||
use clap::Parser;
|
||||
|
||||
use servicepoint2::{
|
||||
Command, CompressionCode, Connection, Origin, PixelGrid, PIXEL_HEIGHT,
|
||||
PIXEL_WIDTH,
|
||||
Command, CompressionCode, Connection, Origin, PIXEL_HEIGHT, PIXEL_WIDTH,
|
||||
PixelGrid,
|
||||
};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
|
@ -29,7 +29,7 @@ fn main() {
|
|||
connection
|
||||
.send(
|
||||
Command::BitmapLinearWin(
|
||||
Origin::top_left(),
|
||||
Origin(0, 0),
|
||||
pixels.clone(),
|
||||
CompressionCode::Lzma,
|
||||
)
|
||||
|
|
|
@ -3,11 +3,11 @@ use std::time::Duration;
|
|||
use clap::Parser;
|
||||
use rand::Rng;
|
||||
|
||||
use servicepoint2::Command::{BitmapLinearWin, Brightness, CharBrightness};
|
||||
use servicepoint2::{
|
||||
ByteGrid, CompressionCode, Connection, Origin, PixelGrid, TILE_HEIGHT,
|
||||
TILE_WIDTH,
|
||||
};
|
||||
use servicepoint2::Command::{BitmapLinearWin, Brightness, CharBrightness};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
struct Cli {
|
||||
|
@ -32,7 +32,7 @@ fn main() {
|
|||
filled_grid.fill(true);
|
||||
|
||||
let command = BitmapLinearWin(
|
||||
Origin::top_left(),
|
||||
Origin(0, 0),
|
||||
filled_grid,
|
||||
CompressionCode::Lzma,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue