This reverts commit 1fd5bcb096
.
Родитель
1fd5bcb096
Сommit
7e5ee83943
Двоичные данные
lab_3.xcodeproj/project.xcworkspace/xcuserdata/lesaminov.xcuserdatad/UserInterfaceState.xcuserstate
сгенерированный
Двоичные данные
lab_3.xcodeproj/project.xcworkspace/xcuserdata/lesaminov.xcuserdatad/UserInterfaceState.xcuserstate
сгенерированный
Двоичный файл не отображается.
@ -1,90 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "35EA3A932A2D54F400ED69F1"
|
||||
BuildableName = "lab_3"
|
||||
BlueprintName = "lab_3"
|
||||
ReferencedContainer = "container:lab_3.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "35EA3AFB2A2E027400ED69F1"
|
||||
BuildableName = "unittest1.xctest"
|
||||
BlueprintName = "unittest1"
|
||||
ReferencedContainer = "container:lab_3.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES"
|
||||
viewDebuggingEnabled = "No">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "35EA3A932A2D54F400ED69F1"
|
||||
BuildableName = "lab_3"
|
||||
BlueprintName = "lab_3"
|
||||
ReferencedContainer = "container:lab_3.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "35EA3A932A2D54F400ED69F1"
|
||||
BuildableName = "lab_3"
|
||||
BlueprintName = "lab_3"
|
||||
ReferencedContainer = "container:lab_3.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1430"
|
||||
version = "1.7">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "35EA3AFB2A2E027400ED69F1"
|
||||
BuildableName = "unittest1.xctest"
|
||||
BlueprintName = "unittest1"
|
||||
ReferencedContainer = "container:lab_3.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,4 +1,9 @@
|
||||
#ifndef SVG_H_INCLUDED
|
||||
#define SVG_H_INCLUDED
|
||||
#include <vector>
|
||||
|
||||
void
|
||||
show_histogram_svg(const std::vector<size_t>& bins);
|
||||
|
||||
|
||||
#endif // SVG_H_INCLUDED
|
||||
|
@ -1,13 +0,0 @@
|
||||
#include <vector>
|
||||
|
||||
void find_minmax(std::vector<double> &numbers, double& min, double& max)
|
||||
{
|
||||
min = numbers[0]; max = numbers[0];
|
||||
for (double x : numbers)
|
||||
{
|
||||
if (max < x)
|
||||
max = x;
|
||||
if (min > x)
|
||||
min = x;
|
||||
}
|
||||
}
|
@ -1,30 +1,31 @@
|
||||
#define DOCTEST_CONFIG_NO_MULTITHREADING
|
||||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
|
||||
#include "doctest.hpp"
|
||||
#include "histogram_internal.hpp"
|
||||
#include <vector>
|
||||
#include "doctest.h"
|
||||
#include "histogram_internal.h"
|
||||
|
||||
TEST_CASE("distinct positive numbers") {
|
||||
double min = 0;
|
||||
double max = 0;
|
||||
std::vector<double> numbers3 = {-5, -3, -4, -1, -2};
|
||||
find_minmax(numbers3, min, max);
|
||||
CHECK(min == -5);
|
||||
CHECK(max == -1);
|
||||
find_minmax({1, 2}, min, max);
|
||||
CHECK(min == 1);
|
||||
CHECK(max == 2);
|
||||
}
|
||||
|
||||
TEST_CASE("vector with same elements") {
|
||||
double min = 0;
|
||||
double max = 0;
|
||||
std::vector<double> numbers3 = {2,2,2};
|
||||
find_minmax(numbers3, min, max);
|
||||
find_minmax({2,2,2}, min, max);
|
||||
CHECK(min == 2);
|
||||
CHECK(max == 2);
|
||||
}
|
||||
TEST_CASE("distinct positive numbers 2") {
|
||||
double min = 0;
|
||||
double max = 0;
|
||||
std::vector<double> numbers3 = {-4};
|
||||
find_minmax(numbers3, min, max);
|
||||
CHECK(min == -4);
|
||||
CHECK(max == -4);
|
||||
std::vector<double>v{2,1};
|
||||
CHECK(v.size() != 0);
|
||||
CHECK(v.size() != 1);
|
||||
find_minmax({1, 2}, min, max);
|
||||
CHECK(min == 1);
|
||||
CHECK(max == 2);
|
||||
CHECK(min != max);
|
||||
}
|
||||
|
Двоичные данные
unittest/unittest.xcodeproj/project.xcworkspace/xcuserdata/lesaminov.xcuserdatad/UserInterfaceState.xcuserstate
сгенерированный
Двоичные данные
unittest/unittest.xcodeproj/project.xcworkspace/xcuserdata/lesaminov.xcuserdatad/UserInterfaceState.xcuserstate
сгенерированный
Двоичный файл не отображается.
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>unittest.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
Загрузка…
Ссылка в новой задаче