Sha256: c24d96a1943942e07e6ca19e7ac895e94d7da9b86e1d581839f873add6190a45
Contents?: true
Size: 843 Bytes
Versions: 1
Compression:
Stored size: 843 Bytes
Contents
require 'spec_helper' describe DpllSolver::Parsers::DimacsParser do let(:f1) { "resources/dimacs/yes/aim-50-1_6-yes1-1.cnf" } let(:f2) { "resources/dimacs/no/aim-50-1_6-no-1.cnf" } let(:f3) { "resources/dimacs/yes/aim-50-6_0-yes1-4.cnf" } it 'should parse files in DIMACS format' do parser = DpllSolver::Parsers::DimacsParser.new(f1) expect(parser.num_vars).to eql 50 expect(parser.num_clauses).to eql 80 expect(parser.clauseset.count).to eql 80 parser = DpllSolver::Parsers::DimacsParser.new(f2) expect(parser.num_vars).to eql 50 expect(parser.num_clauses).to eql 80 expect(parser.clauseset.count).to eql 80 parser = DpllSolver::Parsers::DimacsParser.new(f3) expect(parser.num_vars).to eql 50 expect(parser.num_clauses).to eql 300 expect(parser.clauseset.count).to eql 300 end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dpll_solver-0.0.1 | spec/parsers/dimacs_parser_spec.rb |