Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void testColumnReferenceParameterMissing() {
this.applyAndCheck2(
SpreadsheetExpressionFunctionNumberColumnOrRow.COLUMN,
Lists.empty(),
KIND.create(
EXPRESSION_NUMBER_KIND.create(
REFERENCE.column()
.value()
)
Expand All @@ -54,7 +54,7 @@ public void testRowReferenceParameterMissing() {
this.applyAndCheck2(
SpreadsheetExpressionFunctionNumberColumnOrRow.ROW,
Lists.empty(),
KIND.create(
EXPRESSION_NUMBER_KIND.create(
REFERENCE.row()
.value()
)
Expand All @@ -68,7 +68,7 @@ public void testColumnReferenceParameterPresent() {
this.applyAndCheck2(
SpreadsheetExpressionFunctionNumberColumnOrRow.COLUMN,
Lists.of(B5),
KIND.create(
EXPRESSION_NUMBER_KIND.create(
B5.column()
.value()
)
Expand All @@ -80,7 +80,7 @@ public void testRowReferenceParameterPresent() {
this.applyAndCheck2(
SpreadsheetExpressionFunctionNumberColumnOrRow.ROW,
Lists.of(B5),
KIND.create(
EXPRESSION_NUMBER_KIND.create(
B5.row()
.value()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void testColumnReferenceParameter() {
this.applyAndCheck2(
SpreadsheetExpressionFunctionNumberColumnsOrRows.COLUMNS,
Lists.of(B5),
KIND.one()
EXPRESSION_NUMBER_KIND.one()
);
}

Expand All @@ -75,7 +75,7 @@ public void testRowReferenceParameter() {
this.applyAndCheck2(
SpreadsheetExpressionFunctionNumberColumnsOrRows.ROWS,
Lists.of(B5),
KIND.one()
EXPRESSION_NUMBER_KIND.one()
);
}

Expand Down Expand Up @@ -104,7 +104,7 @@ private void applyAndCheck3(final SpreadsheetExpressionFunctionNumberColumnsOrRo
this.applyAndCheck2(
function,
Lists.of(selection),
KIND.create(expected)
EXPRESSION_NUMBER_KIND.create(expected)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void applyIfAndCheck(final SpreadsheetExpressionFunctionNumberIf functio
condition
),
this.createContext(),
KIND.create(expected)
EXPRESSION_NUMBER_KIND.create(expected)
);
}

Expand All @@ -131,7 +131,7 @@ private List<Object> prepareList(final List<?> list) {

private Object wrapIfNumber(final Object value) {
return value instanceof Number ?
KIND.create((Number) value) :
EXPRESSION_NUMBER_KIND.create((Number) value) :
value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public final void applyAndCheck2(final F function,
this.applyAndCheck2(
function,
parameters.stream()
.map(i -> i instanceof Number ? KIND.create((Number) i) : i)
.map(i -> i instanceof Number ? EXPRESSION_NUMBER_KIND.create((Number) i) : i)
.collect(Collectors.toList()),
this.createContext(),
result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void testNull() {
@Test
public void testNumber() {
this.typeAndCheck(
KIND.create(123),
EXPRESSION_NUMBER_KIND.create(123),
1
);
}
Expand Down Expand Up @@ -147,7 +147,7 @@ private void typeAndCheck(final Object value,
final int expected) {
this.applyAndCheck2(
Lists.of(value),
KIND.create(expected)
EXPRESSION_NUMBER_KIND.create(expected)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import walkingkooka.spreadsheet.value.SpreadsheetCell;
import walkingkooka.text.CharSequences;
import walkingkooka.tree.expression.ExpressionEvaluationContexts;
import walkingkooka.tree.expression.ExpressionNumberKind;
import walkingkooka.tree.expression.function.ExpressionFunctionTesting2;

import java.math.MathContext;
Expand Down Expand Up @@ -87,8 +86,6 @@ public abstract class SpreadsheetExpressionFunctionTestCase<F extends Spreadshee
FORMULA
);

final static ExpressionNumberKind KIND = HasSpreadsheetMetadataTesting.EXPRESSION_NUMBER_KIND;

SpreadsheetExpressionFunctionTestCase() {
super();
}
Expand Down Expand Up @@ -128,7 +125,7 @@ final SpreadsheetExpressionEvaluationContext createContext0() {
).set(SpreadsheetMetadataPropertyName.CELL_CHARACTER_WIDTH, 1)
.set(SpreadsheetMetadataPropertyName.DATE_TIME_OFFSET, Converters.EXCEL_1904_DATE_SYSTEM_OFFSET)
.set(SpreadsheetMetadataPropertyName.DEFAULT_YEAR, 20)
.set(SpreadsheetMetadataPropertyName.EXPRESSION_NUMBER_KIND, KIND)
.set(SpreadsheetMetadataPropertyName.EXPRESSION_NUMBER_KIND, EXPRESSION_NUMBER_KIND)
.set(SpreadsheetMetadataPropertyName.FORMULA_CONVERTER, ConverterSelector.parse("collection(null-to-number, simple, text, number, value)"))
.set(SpreadsheetMetadataPropertyName.PRECISION, MathContext.DECIMAL32.getPrecision())
.set(SpreadsheetMetadataPropertyName.ROUNDING_MODE, RoundingMode.HALF_UP)
Expand Down
Loading