Revision 1652

trunk/src/tools99/val.cpp (revision 1652)
13 13
  if ( (s.size() > 2) && (s(1,2) == adstring("0x") ))
14 14
    z = sscanf((const char*)s, "%x", &v);
15 15
  else
16
    z = sscanf((const char*)s, "%*d", &v);
16
    z = sscanf((const char*)s, "%d", &v);
17 17

  
18 18
  if (z != 1)
19 19
    code = 1;
......
29 29
  if ( (s.size() > 2) && (s(1,2) == adstring("0x") ))
30 30
    z = sscanf((const char*)s, "%x", &v);
31 31
  else
32
    z = sscanf((const char*)s, "%*d", &v);
32
    z = sscanf((const char*)s, "%d", &v);
33 33

  
34 34
  if (z != 1)
35 35
    code = 1;
trunk/tests/gtests/test_df3_two_variable.cpp (revision 1652)
1 1
#include <gtest/gtest.h>
2
#include <df3_two_variable.h>
3 2

  
3
#include <df1b2fun.h>
4

  
4 5
class test_df3_two_variable: public ::testing::Test {};
5 6

  
6 7
TEST_F(test_df3_two_variable, constructor)
......
202 203
  ASSERT_EQ(0, *x.get_u_xyy());
203 204
  ASSERT_EQ(0, *x.get_u_yyy());
204 205
}
206
/*
205 207
TEST_F(test_df3_two_variable, operator_division_equal_double)
206 208
{
207 209
  df3_two_variable x;
......
221 223
  ASSERT_EQ(0, *x.get_u_xyy());
222 224
  ASSERT_EQ(0, *x.get_u_yyy());
223 225
}
226
*/
224 227
TEST_F(test_df3_two_variable, operator_plus_d3_two_variable_d3_two_variable)
225 228
{
226 229
  df3_two_variable x;
trunk/tests/gtests/test_adstring.cpp (revision 1652)
1
#include <gtest/gtest.h>
2
//#include <fvar.hpp>
3
#include <adstring.hpp>
4

  
5
class test_adstring: public ::testing::Test {};
6

  
7
TEST_F(test_adstring, default_constructor)
8
{
9
  adstring a;
10

  
11
  EXPECT_EQ(0, length(a));
12
  EXPECT_EQ(0, a.size());
13
  EXPECT_EQ(0, a.buff_size());
14
  //clist length includes '\0'
15
  EXPECT_EQ(1, a.length());
16
}
17
TEST_F(test_adstring, assignment_operator_adstring)
18
{
19
  adstring a;
20
  a = "tests_adstring";
21

  
22
  EXPECT_EQ(14, length(a));
23
  EXPECT_EQ(14, a.size());
24
  EXPECT_EQ(14, a.buff_size());
25
  //clist length includes '\0'
26
  //JCA: Should be 15?
27
  EXPECT_EQ(1, a.length());
28
}
29
TEST_F(test_adstring, assignment_operator_char)
30
{
31
  adstring a;
32
  const char c = 'c';
33
  a = c;
34

  
35
  EXPECT_EQ('c', a[1]);
36
  EXPECT_EQ(1, length(a));
37
  EXPECT_EQ(1, a.size());
38
  EXPECT_EQ(1, a.buff_size());
39
  //clist length includes '\0'
40
  //JCA: Should be 15?
41
  EXPECT_EQ(1, a.length());
42
}
43
TEST_F(test_adstring, to_upper_and_lower)
44
{
45
  adstring a;
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff