Skip to content

Commit

Permalink
testing: fix for IError changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JalonSolov committed Nov 20, 2024
1 parent 02d49c6 commit a4604d5
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions common/testing/testing.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,33 @@ import regex
// The ...Error structs here implement IError,
// so that they can be used as more specific errors,
// in place of `return error(message)`
struct DidNotFailError {
struct DidNotFailError implements IError {
Error
msg string
code int
}

pub fn (err DidNotFailError) msg() string {
return err.msg()
}

pub fn (err DidNotFailError) code() int {
return err.code
}

struct DoesNotWorkError {
struct DoesNotWorkError implements IError {
Error
msg string
code int
}

pub fn (err DoesNotWorkError) msg() string {
return err.msg()
}

pub fn (err DoesNotWorkError) code() int {
return err.code
}

struct ExitCodesDifferError {
struct ExitCodesDifferError implements IError {
Error
msg string
code int
}

pub fn (err ExitCodesDifferError) msg() string {
return err.msg()
}

pub fn (err ExitCodesDifferError) code() int {
return err.code
}

// CommandPair remembers what original command we are trying to test against
pub struct CommandPair {
pub mut:
Expand Down

0 comments on commit a4604d5

Please sign in to comment.