Skip to content

Commit

Permalink
Update description
Browse files Browse the repository at this point in the history
  • Loading branch information
jacogr committed Nov 17, 2023
1 parent ee8f8aa commit 50e4aff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/util/src/is/riscv.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
import { isRiscV } from './index.js';

describe('isRiscV', (): void => {
it('is false on non-risc-v/non-pvm header', (): void => {
it('is false on non-elf/non-pvm header', (): void => {
expect(isRiscV(new Uint8Array([0, 97, 115, 109, 1, 2, 3]))).toEqual(false);
});

it('is false on partial-risc-v/pvm header', (): void => {
it('is false on partial-elf/pvm header', (): void => {
expect(isRiscV(new Uint8Array([0x7f, 0x45, 0x4c]))).toEqual(false);
});

it('is false on empty byte before risc-v/pvm header', (): void => {
it('is false on empty byte before elf/pvm header', (): void => {
expect(
isRiscV(
new Uint8Array([0x00, 0x7f, 0x45, 0x4c, 0x46, 0xff, 0x00, 0x42, 0x23])
)
).toEqual(false);
});

it('is true when a risc-v header is found', (): void => {
it('is true when a elf header is found', (): void => {
expect(
isRiscV(new Uint8Array([0x7f, 0x45, 0x4c, 0x46, 0xff, 0x00, 0x42, 0x23]))
).toEqual(true);
Expand Down

0 comments on commit 50e4aff

Please sign in to comment.