File tree Expand file tree Collapse file tree
packages/react-native-nitro-storage/cpp/bindings Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33#include < algorithm>
44#include < cassert>
55#include < iostream>
6+ #include < limits>
67#include < map>
78#include < memory>
89#include < optional>
@@ -533,13 +534,14 @@ void testClearNotifiesScope() {
533534void testInvalidInputsAndMissingAdapter () {
534535 auto adapter = std::make_shared<MockAdapter>();
535536 HybridStorage storage (adapter);
537+ const auto nan = std::numeric_limits<double >::quiet_NaN ();
536538
537539 expectThrows ([&]() { storage.set (" bad" , " value" , -1.0 ); });
538540 expectThrows ([&]() { storage.set (" bad" , " value" , 1.5 ); });
539- expectThrows ([&]() { storage.set (" bad" , " value" , std:: nan( " " ) ); });
540- expectThrows ([&]() { storage.setSecureAccessControl (std:: nan( " " ) ); });
541+ expectThrows ([&]() { storage.set (" bad" , " value" , nan); });
542+ expectThrows ([&]() { storage.setSecureAccessControl (nan); });
541543 expectThrows ([&]() { storage.setSecureAccessControl (5.0 ); });
542- expectThrows ([&]() { storage.setSecureBiometricWithLevel (" bad" , " value" , std:: nan( " " ) ); });
544+ expectThrows ([&]() { storage.setSecureBiometricWithLevel (" bad" , " value" , nan); });
543545 expectThrows ([&]() { storage.setSecureBiometricWithLevel (" bad" , " value" , 3.0 ); });
544546
545547 HybridStorage missingAdapter (nullptr );
You can’t perform that action at this time.
0 commit comments