<commit_before>//
//  yas_db_info_tests.mm
//

#import "yas_db_test_utils.h"

using namespace yas;

@interface yas_db_info_tests : XCTestCase

@end

@implementation yas_db_info_tests

- (void)setUp {
    [super setUp];
}

- (void)tearDown {
    [super tearDown];
}

- (void)test_null_info {
    XCTAssertFalse(db::null_info());
}

- (void)test_create {
    db::info info{"1.0.0", 1, 2};

    XCTAssertEqual(info.version(), yas::version{"1.0.0"});
    XCTAssertEqual(info.current_save_id(), 1);
    XCTAssertEqual(info.last_save_id(), 2);
    XCTAssertEqual(info.current_save_id_value(), db::value{1});
    XCTAssertEqual(info.last_save_id_value(), db::value{2});
}

- (void)test_create_with_values {
    db::value_map_t values{{db::version_field, db::value{"1.2.3"}},
                           {db::current_save_id_field, db::value{10}},
                           {db::last_save_id_field, db::value{20}}};
}

@end<commit_msg>テストの更新<commit_after>//
//  yas_db_info_tests.mm
//

#import "yas_db_test_utils.h"

using namespace yas;

@interface yas_db_info_tests : XCTestCase

@end

@implementation yas_db_info_tests

- (void)setUp {
    [super setUp];
}

- (void)tearDown {
    [super tearDown];
}

- (void)test_null_info {
    XCTAssertFalse(db::null_info());
}

- (void)test_create {
    db::info const info{"1.0.0", 1, 2};

    XCTAssertEqual(info.version(), yas::version{"1.0.0"});
    XCTAssertEqual(info.current_save_id(), 1);
    XCTAssertEqual(info.last_save_id(), 2);
    XCTAssertEqual(info.current_save_id_value(), db::value{1});
    XCTAssertEqual(info.last_save_id_value(), db::value{2});
}

- (void)test_create_with_values {
    db::value_map_t values{{db::version_field, db::value{"1.2.3"}},
                           {db::current_save_id_field, db::value{10}},
                           {db::last_save_id_field, db::value{20}}};

    db::info const info{values};

    XCTAssertEqual(info.version(), yas::version{"1.2.3"});
    XCTAssertEqual(info.current_save_id(), 10);
    XCTAssertEqual(info.last_save_id(), 20);
    XCTAssertEqual(info.current_save_id_value(), db::value{10});
    XCTAssertEqual(info.last_save_id_value(), db::value{20});
}

@end
{'fraction_non_alphanumeric': 0.17166589755422243, 'fraction_numerical': 0.022611905860636824, 'mean_word_length': 3.9953917050691246, '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': '5438420', 'n_tokens_mistral': 874, 'n_tokens_neox': 845, 'n_words': 103}