<commit_before>require 'spec_helper'

module Argus
  describe NavData do
    Given(:state_bits) { 0xcf8a0c94 }
    Given(:seq_num) { 173064 }
    Given(:vision_flag) { 0 }
    Given(:raw_header) { Bytes.make_header(state_bits, seq_num, vision_flag) }
    Given(:raw_nav_bytes) { Bytes.make_nav_data(raw_header) }

    When(:nav_data) { NavData.new(raw_nav_bytes) }

    Then { nav_data.sequence_number == 173064 }
    Then { nav_data.vision_flag == 0 }

    describe "sequence number" do
      Given(:seq_num) { 1234 }
      Then { nav_data.sequence_number == 1234 }
    end

    describe "vision flag" do
      Given(:vision_flag) { 1 }
      Then { nav_data.vision_flag == 1 }
    end

    describe "state queries" do
<commit_msg>Add spec for NavData#raw<commit_after>require 'spec_helper'

module Argus
  describe NavData do
    Given(:state_bits) { 0xcf8a0c94 }
    Given(:seq_num) { 173064 }
    Given(:vision_flag) { 0 }
    Given(:raw_header) { Bytes.make_header(state_bits, seq_num, vision_flag) }
    Given(:raw_nav_bytes) { Bytes.make_nav_data(raw_header) }

    When(:nav_data) { NavData.new(raw_nav_bytes) }

    Then { nav_data.sequence_number == 173064 }
    Then { nav_data.vision_flag == 0 }
    Then { nav_data.raw == raw_nav_bytes }

    describe "sequence number" do
      Given(:seq_num) { 1234 }
      Then { nav_data.sequence_number == 1234 }
    end

    describe "vision flag" do
      Given(:vision_flag) { 1 }
      Then { nav_data.vision_flag == 1 }
    end

    describe "state queries" do

{'fraction_non_alphanumeric': 0.11198945981554677, 'fraction_numerical': 0.03820816864295125, 'mean_word_length': 3.27887323943662, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1976736', 'n_tokens_mistral': 583, 'n_tokens_neox': 532, 'n_words': 108}