7#include "fxjs/xfa/cfxjse_mapmodule.h"
11#include "core/fxcrt/fx_string.h"
12#include "testing/gtest/include/gtest/gtest.h"
13#include "xfa/fxfa/parser/cxfa_measurement.h"
20 EXPECT_FALSE(module
.GetValue(1).has_value());
26 const int value = 101;
38 EXPECT_EQ(module
.GetValue(100).value(), value);
39 EXPECT_FALSE(module
.GetString(100).has_value());
42 EXPECT_FALSE(module
.GetValue(200).has_value());
46 EXPECT_FALSE(module
.GetValue(300).has_value());
47 EXPECT_FALSE(module
.GetString(300).has_value());
57 EXPECT_FALSE(module
.GetValue(100).has_value());
58 EXPECT_FALSE(module
.GetString(200).has_value());
70 EXPECT_EQ(module
.GetValue(100).value(), value);
71 EXPECT_FALSE(module
.GetString(100).has_value());
76 EXPECT_FALSE(module
.GetValue(100).has_value());
81 EXPECT_FALSE(module
.GetValue(100).has_value());
82 EXPECT_FALSE(module
.GetString(100).has_value());
87 EXPECT_EQ(module
.GetValue(100).value(), value);
88 EXPECT_FALSE(module
.GetString(100).has_value());
93 const int value1 = 42;
94 const int value2 = -1999;
114 EXPECT_EQ(module1
.GetString(100).value(), string2);
115 EXPECT_EQ(module1
.GetValue(101).value(), value1);
117 EXPECT_EQ(module1
.GetString(201).value(), string1);
118 EXPECT_EQ(module1
.GetValue(300).value(), value2);
122 EXPECT_EQ(module2
.GetString(100).value(), string2);
124 EXPECT_EQ(module2
.GetValue(300).value(), value2);
void MergeDataFrom(const CFXJSE_MapModule *pSrc)
std::optional< int32_t > GetValue(uint32_t key) const
void SetValue(uint32_t key, int32_t value)
void SetMeasurement(uint32_t key, const CXFA_Measurement &measurement)
void SetString(uint32_t key, const WideString &wsString)
std::optional< CXFA_Measurement > GetMeasurement(uint32_t key) const
void RemoveKey(uint32_t key)
bool HasKey(uint32_t key) const
std::optional< WideString > GetString(uint32_t key) const
WideString(const wchar_t *ptr)
TEST(FXCRYPT, MD5GenerateEmtpyData)
fxcrt::WideString WideString