Skip to content

Commit

Permalink
Better names
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderOMara committed Nov 21, 2024
1 parent e51397a commit ad45518
Show file tree
Hide file tree
Showing 25 changed files with 80 additions and 76 deletions.
20 changes: 11 additions & 9 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
"./const": "./const.ts",
"./macro": "./macro.ts",
"./member": "./member/mod.ts",
"./member/f16": "./member/f16.ts",
"./member/f32": "./member/f32.ts",
"./member/f64": "./member/f64.ts",
"./member/i8": "./member/i8.ts",
"./member/i8a": "./member/i8a.ts",
"./member/i16": "./member/i16.ts",
"./member/i24": "./member/i24.ts",
"./member/i32": "./member/i32.ts",
"./member/i64": "./member/i64.ts",
"./member/float": "./member/float/mod.ts",
"./member/float/16": "./member/float/16.ts",
"./member/float/32": "./member/float/32.ts",
"./member/float/64": "./member/float/64.ts",
"./member/int": "./member/int/mod.ts",
"./member/int/8": "./member/int/8.ts",
"./member/int/8a": "./member/int/8a.ts",
"./member/int/16": "./member/int/16.ts",
"./member/int/24": "./member/int/24.ts",
"./member/int/32": "./member/int/32.ts",
"./member/int/64": "./member/int/64.ts",
"./member/struct": "./member/struct.ts",
"./struct": "./struct.ts",
"./type": "./type.ts",
Expand Down
2 changes: 1 addition & 1 deletion macro.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {

import { assignStruct, assignView, endianSwap } from './macro.ts';
import { Struct } from './struct.ts';
import { uint8 } from './member/i8.ts';
import { uint8 } from './member/int/8.ts';

Deno.test('endianSwap', () => {
class Test extends Struct {
Expand Down
8 changes: 4 additions & 4 deletions member/f16.test.ts → member/float/16.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { assertEquals } from '@std/assert';
import { getFloat16, setFloat16 } from '@hqtsm/dataview/f16';

import type { ArrayBufferReal } from '../type.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import type { ArrayBufferReal } from '../../type.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { float16 } from './f16.ts';
import { float16 } from './16.ts';

Deno.test('float16', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/f16.ts → member/float/16.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getFloat16, setFloat16 } from '@hqtsm/dataview/f16';

import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberValue } from '../value.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberValue } from '../../value.ts';

/**
* Member float16.
Expand Down
6 changes: 3 additions & 3 deletions member/f32.test.ts → member/float/32.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assertEquals } from '@std/assert';

import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { float32 } from './f32.ts';
import { float32 } from './32.ts';

Deno.test('float32', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/f32.ts → member/float/32.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberValue } from '../value.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberValue } from '../../value.ts';

/**
* Member float32.
Expand Down
6 changes: 3 additions & 3 deletions member/f64.test.ts → member/float/64.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assertEquals } from '@std/assert';

import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { float64 } from './f64.ts';
import { float64 } from './64.ts';

Deno.test('float64', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/f64.ts → member/float/64.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberValue } from '../value.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberValue } from '../../value.ts';

/**
* Member float64.
Expand Down
3 changes: 3 additions & 0 deletions member/float/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './16.ts';
export * from './32.ts';
export * from './64.ts';
6 changes: 3 additions & 3 deletions member/i16.test.ts → member/int/16.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assertEquals } from '@std/assert';

import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { int16, uint16 } from './i16.ts';
import { int16, uint16 } from './16.ts';

Deno.test('int16', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/i16.ts → member/int/16.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberValue } from '../value.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberValue } from '../../value.ts';

/**
* Member int16.
Expand Down
6 changes: 3 additions & 3 deletions member/i24.test.ts → member/int/24.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { assertEquals } from '@std/assert';
import { getInt24, getUint24 } from '@hqtsm/dataview/i24';

import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { int24, uint24 } from './i24.ts';
import { int24, uint24 } from './24.ts';

Deno.test('int24', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/i24.ts → member/int/24.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { getInt24, getUint24, setInt24, setUint24 } from '@hqtsm/dataview/i24';

import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberValue } from '../value.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberValue } from '../../value.ts';

/**
* Member int24.
Expand Down
6 changes: 3 additions & 3 deletions member/i32.test.ts → member/int/32.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assertEquals } from '@std/assert';

import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { int32, uint32 } from './i32.ts';
import { int32, uint32 } from './32.ts';

Deno.test('int32', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/i32.ts → member/int/32.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberValue } from '../value.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberValue } from '../../value.ts';

/**
* Member int32.
Expand Down
6 changes: 3 additions & 3 deletions member/i64.test.ts → member/int/64.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assertEquals } from '@std/assert';

import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { int64, uint64 } from './i64.ts';
import { int64, uint64 } from './64.ts';

Deno.test('int64', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/i64.ts → member/int/64.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberValue } from '../value.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberValue } from '../../value.ts';

/**
* Member int64.
Expand Down
6 changes: 3 additions & 3 deletions member/i8.test.ts → member/int/8.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { assertEquals } from '@std/assert';

import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { int8, uint8 } from './i8.ts';
import { int8, uint8 } from './8.ts';

Deno.test('int8', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/i8.ts → member/int/8.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberValue } from '../value.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberValue } from '../../value.ts';

/**
* Member int8.
Expand Down
6 changes: 3 additions & 3 deletions member/i8a.test.ts → member/int/8a.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
assertStrictEquals,
} from '@std/assert';

import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';
import { byteLength, byteOffset, getType, littleEndian } from '../../macro.ts';
import { Struct } from '../../struct.ts';

import { int8A, uint8A, uint8AC } from './i8a.ts';
import { int8A, uint8A, uint8AC } from './8a.ts';

Deno.test('int8A', () => {
class Test extends Struct {
Expand Down
6 changes: 3 additions & 3 deletions member/i8a.ts → member/int/8a.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { MembersExtends } from '../type.ts';
import type { Struct } from '../struct.ts';
import { memberView } from '../view.ts';
import type { MembersExtends } from '../../type.ts';
import type { Struct } from '../../struct.ts';
import { memberView } from '../../view.ts';

/**
* Member int8 array.
Expand Down
6 changes: 6 additions & 0 deletions member/int/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from './8.ts';
export * from './8a.ts';
export * from './16.ts';
export * from './24.ts';
export * from './32.ts';
export * from './64.ts';
11 changes: 2 additions & 9 deletions member/mod.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
export * from './f16.ts';
export * from './f32.ts';
export * from './f64.ts';
export * from './i8.ts';
export * from './i8a.ts';
export * from './i16.ts';
export * from './i24.ts';
export * from './i32.ts';
export * from './i64.ts';
export * from './float/mod.ts';
export * from './int/mod.ts';
export * from './struct.ts';
2 changes: 1 addition & 1 deletion member/struct.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { byteLength, byteOffset, getType, littleEndian } from '../macro.ts';
import { Struct } from '../struct.ts';

import { uint32 } from './i32.ts';
import { uint32 } from './int/32.ts';
import { memberStruct } from './struct.ts';

Deno.test('memberStruct', () => {
Expand Down
2 changes: 1 addition & 1 deletion struct.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { assertEquals, assertStrictEquals, assertThrows } from '@std/assert';

import { Struct } from './struct.ts';
import { LITTLE_ENDIAN } from './const.ts';
import { int8 } from './member/i8.ts';
import { int8 } from './member/int/8.ts';

Deno.test('buffer', () => {
const buffer = new ArrayBuffer(0);
Expand Down

0 comments on commit ad45518

Please sign in to comment.