parsecs 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/libnativemath/extconf.rb +1 -1
- data/lib/parsec.rb +1 -1
- data/test/test_parsec.rb +10 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8566c9f69bf89c5eb77d4b9e7261d8b4dea1c06281799e3e7c22b1ab588a1c2
|
4
|
+
data.tar.gz: e41c5e300b313bb0ab6d1e875f5fca27d2df2c1d13c3768c09c6adb8d887658a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93bccbda2ca5c35be69c69022c84cfa5ed7edc4b34efa54ee724597a5b7a7dddd9be881fd1b46347df66b82a3caaa0f1f289338862012738d1c9cf09594023c5
|
7
|
+
data.tar.gz: 57811de74f4ef11cbc3c710f12816278d535fcdd6753e225496ec21fee15fb0f3fbf714a87e7d051531a53f5b2f7489b2ad03bedb3c22af13b43b1fe895dd33d
|
@@ -38,7 +38,7 @@ libs.each do |lib|
|
|
38
38
|
end
|
39
39
|
|
40
40
|
GIT_REPOSITORY = 'https://github.com/niltonvasques/equations-parser.git'.freeze
|
41
|
-
COMMIT = '
|
41
|
+
COMMIT = 'f83b631eff678b9c6bf1c2d31e524c1b587cb048'.freeze
|
42
42
|
|
43
43
|
Dir.chdir(BASEDIR) do
|
44
44
|
system('git init')
|
data/lib/parsec.rb
CHANGED
data/test/test_parsec.rb
CHANGED
@@ -202,8 +202,17 @@ class TestParsec < Minitest::Test
|
|
202
202
|
assert_equal(false, parsec.eval_equation('default_value(false, true)'))
|
203
203
|
assert_equal(true, parsec.eval_equation('default_value(NULL, true)'))
|
204
204
|
|
205
|
+
# Mixing number types
|
206
|
+
assert_equal(1, parsec.eval_equation('default_value(1, 4.5)'))
|
207
|
+
assert_equal(1, parsec.eval_equation('default_value(1, 10)'))
|
208
|
+
assert_equal(1, parsec.eval_equation('default_value(1, 10.0)'))
|
209
|
+
assert_equal(1, parsec.eval_equation('default_value(1.0, 10)'))
|
210
|
+
assert_equal(1, parsec.eval_equation('default_value(1.0, 10.0)'))
|
211
|
+
assert_equal(1.5, parsec.eval_equation('default_value(1.5, 10)'))
|
212
|
+
assert_equal(1.5, parsec.eval_equation('default_value(1.5, 10.0)'))
|
213
|
+
assert_equal(1.5, parsec.eval_equation('default_value(1.5, 10.5)'))
|
214
|
+
|
205
215
|
# Error Scenarios
|
206
|
-
assert_raises(SyntaxError) { parsec.eval_equation('default_value(1, 4.5)') }
|
207
216
|
assert_raises(SyntaxError) { parsec.eval_equation('default_value(4.5, "string")') }
|
208
217
|
assert_raises(SyntaxError) { parsec.eval_equation('default_value("string", true)') }
|
209
218
|
assert_raises(SyntaxError) { parsec.eval_equation('default_value(true, 1)') }
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parsecs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nilton Vasques
|
8
8
|
- Victor Cordeiro
|
9
9
|
- Beatriz Fagundes
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-06
|
13
|
+
date: 2020-10-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
@@ -62,7 +62,7 @@ homepage: https://github.com/niltonvasques/parsec
|
|
62
62
|
licenses:
|
63
63
|
- MIT
|
64
64
|
metadata: {}
|
65
|
-
post_install_message:
|
65
|
+
post_install_message:
|
66
66
|
rdoc_options: []
|
67
67
|
require_paths:
|
68
68
|
- lib
|
@@ -81,9 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
requirements:
|
82
82
|
- swig
|
83
83
|
- cmake
|
84
|
-
|
85
|
-
|
86
|
-
signing_key:
|
84
|
+
rubygems_version: 3.1.4
|
85
|
+
signing_key:
|
87
86
|
specification_version: 4
|
88
87
|
summary: A gem to evaluate equations using muparserx C++ library
|
89
88
|
test_files:
|