码迷,mamicode.com
首页 >  
搜索关键字:assert    ( 2161个结果
[00018]-[2015-09-08]-[00]-[列表控件显示图标的实现]
要显示图标,当然需要图标资源,这个可以去下载// 设置 ListCtl 样式 和 规格 同时给m_list 设置 图像List (CImageList)void CXXXXDlg::InitListCtl(){ m_pImageList = new CImageList(); ASSERT(m_pI...
分类:其他好文   时间:2015-09-08 19:50:54    阅读次数:188
Junit接口测试(3)
//将返回值的data部分序列化,取出某个参数进行assert 1 @Test 2 public void loginTest_diffDeviceToken(){ 3 String account = "xxxx"; 4 String password = ...
分类:其他好文   时间:2015-09-08 12:29:53    阅读次数:181
模拟strlen的三种实现方式
#include<stdio.h>#include<stdlib.h>#include<assert.h>#include<stdio.h>#include<stdlib.h>#include<assert.h>intmy_strlen(constchar*p){intcount=0;assert(p!=NULL);while(*p){count++;p++;}returncount;}//遍历字符串intmy_strlen_2..
分类:其他好文   时间:2015-09-08 07:16:33    阅读次数:139
新代码
package com.junits;import static org.junit.Assert.*;import org.junit.Before; import org.junit.Test;public class ClassTest {@Before public void setUp()...
分类:其他好文   时间:2015-09-07 12:42:47    阅读次数:147
MFC函数之BitBlt
MFC函数之BitBlt// Cgame123View 绘制void Cgame123View::OnDraw(CDC* pDC){ Cgame123Doc* pDoc = GetDocument(); ASSERT_VALID(pDoc); if (!pDoc) r...
分类:编程语言   时间:2015-09-07 11:12:32    阅读次数:220
常见的内存错误及其对策
内存分配未成功,却使用了它。编程新手常犯这种错误,因为他们没有意识到内存分配会不成功。常用解决办法是,在使用内存之前检查指针是否为NULL。如果指针p是函数的参数,那么在函数的入口处用assert(p!=NULL)进行检查。如果是用malloc或new来申请内存,应该用if(p==NULL)或if(..
分类:其他好文   时间:2015-09-04 02:20:00    阅读次数:188
strcpy、strncpy、strcmp、strncmp、strlen源码
strcpy#include #include char * strcpy( char *strDest, const char *strSrc ) //将源字符串加const,表明其为输入参数{ assert( (strDest != NULL) &&(strSrc != NULL) ); /.....
分类:其他好文   时间:2015-09-02 07:02:52    阅读次数:208
C&C++——库头文件及其作用
1、 一些头文件的作用::ANSI C。提供断言,assert(表达式):GCC。GTK,GNOME的基础库,提供很多有用的函数,如有数据结构操作函数。使用glib只需要包含:GCC。文件夹操作函数。struct dirent,struct DIR,opendir(),closedir(),read...
分类:编程语言   时间:2015-08-31 11:42:49    阅读次数:251
Java基础の乱弹琴一:assert关键字
一。概述assert:表示断言二。语法在Java中,assert关键字是从JAVA SE 1.4 引入的,为了避免和老版本的Java代码中使用了assert关键字导致错误,Java在执行的时候默认是不启动断言检查的(这个时候,所有的断言语句都 将忽略!),如果要开启断言检查,则需要用开关-enabl...
分类:编程语言   时间:2015-08-29 00:43:14    阅读次数:164
单元测试必须了解一下
System.IO.FileInfo file = null;System.IO.FileInfo file1 = file;System.IO.DirectoryInfo dir = null;string tempTrue = "T";string tempFalse = "F";Assert....
分类:其他好文   时间:2015-08-28 16:55:02    阅读次数:117
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!