Skip to content

Commit

Permalink
refactor: update view pattern test syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
bobzhang committed Jan 27, 2025
1 parent 719f098 commit 4a6e310
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions bytes/view_pattern_test.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.


test "View::pattern" {
let view = b"\x01\x02\x03"[:]
match view {
[0x01, 0x02, ..rest] => {
inspect!(rest, content="b\"\\x03\"")
}
[0x01, 0x02, .. rest] => inspect!(rest, content="b\"\\x03\"")
_ => abort("should not happen")
}
}

0 comments on commit 4a6e310

Please sign in to comment.