Added python unit tests, more ruby unit tests, ruby acceptance tests · brobits/quickfix-cpp@e574426 · GitHub
Skip to content

Commit e574426

Browse files
committed
Added python unit tests, more ruby unit tests, ruby acceptance tests
1 parent 7463e52 commit e574426

21 files changed

Lines changed: 2621 additions & 252 deletions

‎spec/GeneratorPython.rb‎

Lines changed: 5 additions & 4 deletions

‎spec/GeneratorRuby.rb‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def fieldsStart
110110
@depth += 1
111111
end
112112

113-
def fieldType( type )
113+
def fieldType( name, type )
114+
return "CheckSum" if name == "CheckSum"
114115
return "Char" if type == "CHAR"
115116
return "Double" if type == "PRICE"
116117
return "Int" if type == "INT"
@@ -131,7 +132,7 @@ def fieldType( type )
131132
end
132133

133134
def fields(name, number, type)
134-
@f.puts tabs + "class #{name} < Quickfix::#{fieldType(type)}Field"
135+
@f.puts tabs + "class #{name} < Quickfix::#{fieldType(name, type)}Field"
135136
@depth += 1
136137
@f.puts tabs + "def #{name}.field"
137138
@depth += 1

‎src/C++/Message.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Message : public FieldMap
6868
throw( InvalidMessage );
6969

7070
/// Construct a message from a string using a data dictionary
71-
Message( const std::string& string, const DataDictionary& dataDictionary,
71+
Message( const std::string& string, const FIX::DataDictionary& dataDictionary,
7272
bool validate = true )
7373
throw( InvalidMessage );
7474

@@ -149,7 +149,7 @@ class Message : public FieldMap
149149
*/
150150
void setString( const std::string& string,
151151
bool validate = true,
152-
const DataDictionary* pDataDictionary = 0 )
152+
const FIX::DataDictionary* pDataDictionary = 0 )
153153
throw( InvalidMessage );
154154

155155
void setGroup( const std::string& msg, const FieldBase& field,

‎src/at.rb‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
require 'quickfix_ruby'
2+
require '../src/at_application'
3+
4+
if( ARGV.length == 0 )
5+
puts "usage: at.rb -f FILE"
6+
exit 1
7+
end
8+
9+
file = ARGV[0]
10+
11+
settings = Quickfix::SessionSettings.new( file )
12+
application = Application.new
13+
factory = Quickfix::FileStoreFactory.new( "store" )
14+
15+
acceptor = Quickfix::SocketAcceptor.new( application, factory, settings )
16+
17+
acceptor.start()
18+
while( true )
19+
sleep( 1 )
20+
end
21+
acceptor.stop()

‎src/at_application.rb‎

Lines changed: 62 additions & 0 deletions

0 commit comments

Comments
 (0)