0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

patch 9.0.0491: no good reason to build without the float feature

Problem:    No good reason to build without the float feature.
Solution:   Remove configure check for float and "#ifdef FEAT_FLOAT".
This commit is contained in:
Bram Moolenaar
2022-09-17 21:08:33 +01:00
parent 1c3dd8ddcb
commit 73e28dcc61
74 changed files with 589 additions and 1152 deletions

View File

@@ -96,9 +96,7 @@ def Test_assignment()
# calling job_start() is in test_vim9_fails.vim, it causes leak reports
endif
if has('float')
var float1: float = 3.4
endif
var float1: float = 3.4
var Funky1: func
var Funky2: func = function('len')
var Party2: func = funcref('g:Test_syntax')
@@ -147,17 +145,15 @@ def Test_assignment()
&ts %= 4
assert_equal(2, &ts)
if has('float')
var f100: float = 100.0
f100 /= 5
assert_equal(20.0, f100)
var f100: float = 100.0
f100 /= 5
assert_equal(20.0, f100)
var f200: float = 200.0
f200 /= 5.0
assert_equal(40.0, f200)
var f200: float = 200.0
f200 /= 5.0
assert_equal(40.0, f200)
v9.CheckDefFailure(['var nr: number = 200', 'nr /= 5.0'], 'E1012:')
endif
v9.CheckDefFailure(['var nr: number = 200', 'nr /= 5.0'], 'E1012:')
lines =<< trim END
&ts = 6
@@ -227,11 +223,9 @@ def Test_assignment()
g:inc_counter += 1
assert_equal(2, g:inc_counter)
if has('float')
var f: float
f += 1
assert_equal(1.0, f)
endif
var f: float
f += 1
assert_equal(1.0, f)
$SOME_ENV_VAR ..= 'more'
assert_equal('somemore', $SOME_ENV_VAR)
@@ -250,20 +244,16 @@ def Test_assignment()
enddef
def Test_float_and_number()
if !has('float')
MissingFeature float
else
var lines =<< trim END
var f: float
f += 2
f -= 1
assert_equal(1.0, f)
++f
--f
assert_equal(1.0, f)
END
v9.CheckDefAndScriptSuccess(lines)
endif
var lines =<< trim END
var f: float
f += 2
f -= 1
assert_equal(1.0, f)
++f
--f
assert_equal(1.0, f)
END
v9.CheckDefAndScriptSuccess(lines)
enddef
let g:someNumber = 43
@@ -1314,10 +1304,8 @@ def Test_assignment_default()
var thenumber: number
assert_equal(0, thenumber)
if has('float')
var thefloat: float
assert_equal(0.0, thefloat)
endif
var thefloat: float
assert_equal(0.0, thefloat)
var thestring: string
assert_equal('', thestring)