Skip to content

Commit fa43064

Browse files
committed
Merge pull request #254 from lynxlynxlynx/master
test&doc friday
2 parents 500a953 + 3c1a778 commit fa43064

File tree

5 files changed

+50
-1
lines changed

5 files changed

+50
-1
lines changed

INSTALL

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Optional dependencies:
110110
- for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
111111
- for gps plugin - expat >= 1.95 and gpsbabel
112112
- for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
113-
- for python support - SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2
113+
- for python support - SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2 with python bindings
114114
- for qgis mapserver - FastCGI
115115

116116

resources/function_help/ln-en_US

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h3>ln() function</h3>
2+
Returns the value of the natural logarithm of the passed expression.
3+
<br>
4+
This function takes one argument.
5+
<h4>Syntax</h4>
6+
<code>ln(value)</code><br>
7+
8+
<h4>Arguments</h4>
9+
<code>value</code> - any positive number.
10+
<br>
11+
12+
<h4>Example</h4>
13+
<!-- Show example of function.-->
14+
<code>ln(1) &rarr; 0</code><br>
15+
<code>ln(e) &rarr; 1</code><br>

resources/function_help/log-en_US

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<h3>log() function</h3>
2+
Returns the value of the logarithm of the passed value and base.
3+
<br>
4+
This function takes two arguments.
5+
<h4>Syntax</h4>
6+
<code>log(base, value)</code><br>
7+
8+
<h4>Arguments</h4>
9+
<code>base</code> - any positive number.
10+
<code>value</code> - any positive number.
11+
<br>
12+
13+
<h4>Example</h4>
14+
<!-- Show example of function.-->
15+
<code>log(2, 32) &rarr; 5</code><br>
16+
<code>log(0.5, 32) &rarr; -5</code><br>

resources/function_help/log10-en_US

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h3>log10() function</h3>
2+
Returns the value of the base 10 logarithm of the passed expression.
3+
<br>
4+
This function takes one argument.
5+
<h4>Syntax</h4>
6+
<code>log10(value)</code><br>
7+
8+
<h4>Arguments</h4>
9+
<code>value</code> - any positive number.
10+
<br>
11+
12+
<h4>Example</h4>
13+
<!-- Show example of function.-->
14+
<code>log10(1) &rarr; 0</code><br>
15+
<code>log10(100) &rarr; 2</code><br>

tests/src/core/testqgsexpression.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ class TestQgsExpression: public QObject
246246
QTest::newRow( "log10(100)" ) << "log10(100)" << false << QVariant( 2. );
247247
QTest::newRow( "log(2,32)" ) << "log(2,32)" << false << QVariant( 5. );
248248
QTest::newRow( "log(10,1000)" ) << "log(10,1000)" << false << QVariant( 3. );
249+
QTest::newRow( "log(-2,32)" ) << "log(-2,32)" << false << QVariant( );
250+
QTest::newRow( "log(2,-32)" ) << "log(2,-32)" << false << QVariant( );
251+
QTest::newRow( "log(0.5,32)" ) << "log(0.5,32)" << false << QVariant( -5. );
249252
QTest::newRow( "round(1234.557,2) - round up" ) << "round(1234.557,2)" << false << QVariant( 1234.56 );
250253
QTest::newRow( "round(1234.554,2) - round down" ) << "round(1234.554,2)" << false << QVariant( 1234.55 );
251254
QTest::newRow( "round(1234.6) - round up to int" ) << "round(1234.6)" << false << QVariant( 1235 );

0 commit comments

Comments
 (0)