This commit is contained in:
BorysLevytskyi
2023-05-12 17:42:16 +02:00
parent 8560ed1309
commit 10cc3fbe1d
3 changed files with 9 additions and 9 deletions

View File

@@ -219,7 +219,7 @@ getLabel(): string {
let text = `${op.value.maxBitSize}-bit `;
const signedStr = op.value.signed ? 'signed' : 'unsigned';
const signedOther = op.value.signed ? 'usigned' : 'signed';
const signedOther = op.value.signed ? 'unsigned' : 'signed';
const signedButtonTitle = `Click to change to ${signedOther} preserving the same bits`;
if(op.label.length > 0)

View File

@@ -105,7 +105,7 @@ describe("parser", () => {
expect(v?.num()).toBe(1);
});
it('fits usigned int32 max value into 32-bit data type', () => {
it('fits unsigned int32 max value into 32-bit data type', () => {
const n1 = numberParser.parse("4294967295u");
const n2 = numberParser.parse("4294967296u");
@@ -125,28 +125,28 @@ describe("parser", () => {
//expect(v2).toEqual(v);
});
it('parses usigned single', () => {
it('parses unsigned single', () => {
var v = numberParser.parse('1us')?.value
expect(v?.maxBitSize).toBe(16);
expect(v?.num()).toBe(1);
expect(v?.signed).toBe(false);
});
it('parses usigned int32', () => {
it('parses unsigned int32', () => {
var v = numberParser.parse('1u')?.value
expect(v?.maxBitSize).toBe(32);
expect(v?.num()).toBe(1);
expect(v?.signed).toBe(false);
});
it('parses usigned byte', () => {
it('parses unsigned byte', () => {
var v = numberParser.parse('1ub')?.value
expect(v?.maxBitSize).toBe(8);
expect(v?.num()).toBe(1);
expect(v?.signed).toBe(false);
});
it('parses usigned long', () => {
it('parses unsigned long', () => {
var v = numberParser.parse('1ul')?.value
expect(v?.maxBitSize).toBe(64);
expect(v?.num()).toBe(1);

View File

@@ -20,7 +20,7 @@ function SettingsPane(props : SettingsPaneProps) {
</button>
<p className='description'>
{appState.emphasizeBytes
? "Each binary string is extended to contain at least 8 bits. White space is be added between each group of 8 bits which signify a bytes so it is easier to tell them apart."
? "Each binary string is extended to contain at least 8 bits. A white space is added between each group of 8 bits so it easy to tell bytes apart."
: "Binary strings are not modified."}
</p>
</div>
@@ -30,8 +30,8 @@ function SettingsPane(props : SettingsPaneProps) {
</button>
<p className='description'>
{appState.annotateTypes
? "BitwiseCmd shows the integer size as well as indication whether the data type is signed or not. BitwiseCmd also allows to flip between signed/usigned versions of certain values preserving their binary representation."
: "Infomration about size of integers used in calculation is hidden."}
? "BitwiseCmd shows the integer size and indicates whether the data type is signed or unsigned."
: "Information about the size of integers used in the calculation is hidden."}
</p>
</div>