Mercurial > vim
diff src/testdir/test_vim9_assign.vim @ 30310:029c59bf78f1 v9.0.0491
patch 9.0.0491: no good reason to build without the float feature
Commit: https://github.com/vim/vim/commit/73e28dcc6125f616cf1f2d56443d22428a79e434
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 17 21:08:33 2022 +0100
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".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 17 Sep 2022 22:15:05 +0200 |
parents | e0cb5fb44859 |
children | 7fde373affbf |
line wrap: on
line diff
--- a/src/testdir/test_vim9_assign.vim +++ b/src/testdir/test_vim9_assign.vim @@ -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 f200: float = 200.0 - f200 /= 5.0 - assert_equal(40.0, f200) - - v9.CheckDefFailure(['var nr: number = 200', 'nr /= 5.0'], 'E1012:') - endif + 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) + + 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)