⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classlocaltests.tex

📁 This SDK allows to integrate a syncml stack in a C++ application on a variety of platforms. Current
💻 TEX
字号:
\section{LocalTests Class Reference}\label{classLocalTests}\index{LocalTests@{LocalTests}}local test of one sync source and utility functions also used by sync tests  Collaboration diagram for LocalTests:\nopagebreak\begin{figure}[H]\begin{center}\leavevmode\includegraphics[width=140pt]{classLocalTests__coll__graph}\end{center}\end{figure}\subsection*{Public Member Functions}\begin{CompactItemize}\item \textbf{LocalTests} (const std::string \&name, {\bf ClientTest} \&cl, int sourceParam, {\bf ClientTest::Config} \&co)\label{classLocalTests_d20120d9d597a0e81bdaf4651a7c04e7}\item void {\bf addTests} ()\label{classLocalTests_a75ca0b749c031d14d99f11ad72fa3dd}\begin{CompactList}\small\item\em adds the supported tests to the instance itself \item\end{CompactList}\item void {\bf insert} ({\bf CreateSource} createSource, const char $\ast$data)\begin{CompactList}\small\item\em opens source and inserts the given item; can be called regardless whether the data source already contains items or not \item\end{CompactList}\item void {\bf update} ({\bf CreateSource} createSource, const char $\ast$data)\begin{CompactList}\small\item\em assumes that exactly one element is currently inserted and updates it with the given item \item\end{CompactList}\item void {\bf deleteAll} ({\bf CreateSource} createSource)\label{classLocalTests_85fef3b837faa5952472285c0f460faf}\begin{CompactList}\small\item\em deletes all items locally via sync source \item\end{CompactList}\item void {\bf compareDatabases} (const char $\ast$refFile, {\bf SyncSource} \&copy, bool raiseAssert=true)\begin{CompactList}\small\item\em takes two databases, exports them, then compares them using synccompare \item\end{CompactList}\item int {\bf insertManyItems} ({\bf CreateSource} createSource, int startIndex=1, int numItems=0, int size=-1)\begin{CompactList}\small\item\em insert artificial items, number of them determined by TEST\_\-EVOLUTION\_\-NUM\_\-ITEMS unless passed explicitly \item\end{CompactList}\item void \textbf{testOpen} ()\label{classLocalTests_86523e51eeb7f4b2f9af40483952a13d}\item void \textbf{testIterateTwice} ()\label{classLocalTests_e859169c3e1f1306be4b7fdb74635c08}\item void \textbf{testSimpleInsert} ()\label{classLocalTests_4f6150f962c87e26e04462237471eb59}\item void \textbf{testLocalDeleteAll} ()\label{classLocalTests_51dc0792ddba8ef6edafa0cf14b9e0fa}\item void \textbf{testComplexInsert} ()\label{classLocalTests_33765a5f9ea2b98b9f5db89e45275603}\item void \textbf{testLocalUpdate} ()\label{classLocalTests_fe4acc8d97f4c4511b07f1283254aecc}\item void \textbf{testChanges} ()\label{classLocalTests_9eafd5c7f66ec1a01130fe906bf4fbf4}\item void \textbf{testImport} ()\label{classLocalTests_18af29fdc3e8816478d535fc80809ed2}\item void \textbf{testImportDelete} ()\label{classLocalTests_1f87c00619bf71f26ae9a7a35e410803}\item void \textbf{testManyChanges} ()\label{classLocalTests_c79d3081b27df1fd5c12070a23f7dc0f}\end{CompactItemize}\subsection*{Public Attributes}\begin{CompactItemize}\item {\bf ClientTest} \& {\bf client}\label{classLocalTests_e5709a00bd1d0c0aaa98c48ed255098c}\begin{CompactList}\small\item\em the client we are testing \item\end{CompactList}\item const int {\bf source}\label{classLocalTests_08ad8ca8670698be655bf547a78b4471}\begin{CompactList}\small\item\em number of the source we are testing in that client \item\end{CompactList}\item const {\bf ClientTest::Config} {\bf config}\label{classLocalTests_b745c9235176e04fae5a0b918aebb87e}\begin{CompactList}\small\item\em configuration that corresponds to source \item\end{CompactList}\item {\bf CreateSource} {\bf createSourceA}\label{classLocalTests_a3e9f028a40fbe46322ac2e7e8fe5640}\begin{CompactList}\small\item\em helper funclets to create sources \item\end{CompactList}\item {\bf CreateSource} \textbf{createSourceB}\label{classLocalTests_abae458e7851e1dbc05eba556037a5ed}\end{CompactItemize}\subsection{Detailed Description}local test of one sync source and utility functions also used by sync tests \subsection{Member Function Documentation}\index{LocalTests@{LocalTests}!insert@{insert}}\index{insert@{insert}!LocalTests@{LocalTests}}\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LocalTests::insert ({\bf CreateSource} {\em createSource}, const char $\ast$ {\em data})\hspace{0.3cm}{\tt  [inline]}}\label{classLocalTests_9d280c251a57a806b1a54f812e662253}opens source and inserts the given item; can be called regardless whether the data source already contains items or not The type of the item is unset; it is assumed that the source can handle that. \index{LocalTests@{LocalTests}!update@{update}}\index{update@{update}!LocalTests@{LocalTests}}\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LocalTests::update ({\bf CreateSource} {\em createSource}, const char $\ast$ {\em data})\hspace{0.3cm}{\tt  [inline]}}\label{classLocalTests_759994c1c10ea44cd5e72cfd0443a700}assumes that exactly one element is currently inserted and updates it with the given item The type of the item is cleared, as in \doxyref{insert()}{p.}{classLocalTests_9d280c251a57a806b1a54f812e662253} above. \index{LocalTests@{LocalTests}!compareDatabases@{compareDatabases}}\index{compareDatabases@{compareDatabases}!LocalTests@{LocalTests}}\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void LocalTests::compareDatabases (const char $\ast$ {\em refFile}, {\bf SyncSource} \& {\em copy}, bool {\em raiseAssert} = {\tt true})\hspace{0.3cm}{\tt  [inline]}}\label{classLocalTests_a71193120c1176e08647ccdf9e5f4548}takes two databases, exports them, then compares them using synccompare \begin{Desc}\item[Parameters:]\begin{description}\item[{\em refFile}]existing file with source reference items, NULL uses a dump of sync source A instead \item[{\em copy}]a sync source which contains the copied items, begin/endSync will be called \item[{\em raiseAssert}]raise assertion if comparison yields differences (defaults to true) \end{description}\end{Desc}\index{LocalTests@{LocalTests}!insertManyItems@{insertManyItems}}\index{insertManyItems@{insertManyItems}!LocalTests@{LocalTests}}\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int LocalTests::insertManyItems ({\bf CreateSource} {\em createSource}, int {\em startIndex} = {\tt 1}, int {\em numItems} = {\tt 0}, int {\em size} = {\tt -1})\hspace{0.3cm}{\tt  [inline]}}\label{classLocalTests_08c17db8b00624d8dc940d882dc8a336}insert artificial items, number of them determined by TEST\_\-EVOLUTION\_\-NUM\_\-ITEMS unless passed explicitly \begin{Desc}\item[Parameters:]\begin{description}\item[{\em createSource}]a factory for the sync source that is to be used \item[{\em startIndex}]IDs are generated starting with this value \item[{\em numItems}]number of items to be inserted if non-null, otherwise TEST\_\-EVOLUTION\_\-NUM\_\-ITEMS is used \item[{\em size}]minimum size for new items \end{description}\end{Desc}\begin{Desc}\item[Returns:]number of items inserted \end{Desc}The documentation for this class was generated from the following file:\begin{CompactItemize}\item test/ClientTest.cpp\end{CompactItemize}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -