Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 31549:6f1cbee3d652 v9.0.1107
patch 9.0.1107: float constant not recognized as float
Commit: https://github.com/vim/vim/commit/73ade49c4b692e77d2c0b2ef0afbedbf55c5f946
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 27 20:54:41 2022 +0000
patch 9.0.1107: float constant not recognized as float
Problem: Float constant not recognized as float.
Solution: Check the vartype instead of comparing with t_float.
(closes #11754)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 27 Dec 2022 22:00:05 +0100 |
parents | 1a32f1a4f823 |
children | 67d9fbe516a3 |
comparison
equal
deleted
inserted
replaced
31548:0b9737689389 | 31549:6f1cbee3d652 |
---|---|
2043 assert_equal(654, 0654) | 2043 assert_equal(654, 0654) |
2044 | 2044 |
2045 assert_equal(6, 0x6) | 2045 assert_equal(6, 0x6) |
2046 assert_equal(15, 0xf) | 2046 assert_equal(15, 0xf) |
2047 assert_equal(255, 0xff) | 2047 assert_equal(255, 0xff) |
2048 | |
2049 const INFTY = 1.0 / 0.0 | |
2050 def Test() | |
2051 assert_equal(1, isinf(INFTY)) | |
2052 assert_equal(-1, isinf(-INFTY)) | |
2053 enddef | |
2054 Test() | |
2048 END | 2055 END |
2049 v9.CheckDefAndScriptSuccess(lines) | 2056 v9.CheckDefAndScriptSuccess(lines) |
2050 enddef | 2057 enddef |
2051 | 2058 |
2052 def Test_expr9_float() | 2059 def Test_expr9_float() |